9669

using jquery mobile and codeigniter framework php

Question:

I'm creating jquery mobile site using codeigniter framework.If I start my project without using jquery mobile in the head everything work but if I insert jquery mobile in the head of my page and try to start my project I receive a gray page with write on undefined. I want explicity say that I'm not using any scripts in my page only I call in the head :

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>

which are the scripts to use jquery mobile. Which could be the cause since I'm not expert in javascript

Answer1:

Perhaps it is an issue with noConflict?

<a href="http://api.jquery.com/jQuery.noConflict/" rel="nofollow">http://api.jquery.com/jQuery.noConflict/</a>

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> <script type="text/javascript"> jQuery.noConflict(); </script> <hr />

Update: it is an issue with data-url attribute used by jquery mobile. JQMobile uses that attribute to update the URL, so if it isn't set, redirects or other navigation won't update the url when using JQMobile.

<hr />

Update to the update: the key was turning off ajax in the form:

<form action="" method="POST" accept-charset="utf-8" data-ajax="false">

Recommend

  • Look-and-feel of an applet window changes on subsequent displays
  • sharedWithMe does not work with drive.file scope
  • How to create / where the batch endpoint is for an asp.net OData webservice
  • windows store certification kit - c++ library validation issues
  • python: forcing relative imports to search from script file
  • Python 3.2.2, error(scripts to exe)
  • Getting error 'Cannot read property 'document' of undefined' while importing exp
  • Uncaught TypeError: $(…).select2 is not a function
  • How to view images from protected folder with php?
  • Display images in Django
  • Test if a set exists before trying to drop it
  • DomPDF {PAGE_NUM} not on first page
  • Javascript simulate pressing enter in input box
  • Uncaught Error: Could not find module `ember-load-initializers`
  • req.body is undefined - nodejs
  • Accessing IRQ description array within a module and displaying action names
  • Resize panoramic image to fixed size
  • Modifying destination and filename of gulp-svg-sprite
  • Javascript Callbacks with Object constructor
  • Where to put my custom functions in Wordpress?
  • Importing jscolor library in angular 2
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • bootstrap to use multiple ng-app
  • How to get icons for entities from eclipse?
  • A cron job substitute?
  • Change div Background jquery
  • Turn off referential integrity in Derby? is it possible?
  • How does Linux kernel interrupt the application?
  • Append folder name and increment by 1 using batch script
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • JaxB to read class hierarchy
  • Easiest way to encapsulate a HTML5 webpage into an android app?
  • Busy indicator not showing up in wpf window [duplicate]
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • Why do underscore prefixed variables exist?
  • java string with new operator and a literal