Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: IE issue for jquery load

  1. #1
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    54
    Thanked 3 Times in 3 Posts

    Default IE issue for jquery load

    Hi john

    Iam using following function for loading a layer( "id = requestpgr")from a page requestpassword into a layer loader using following code in jquery
    Code:
    $('#loader').load('<?php echo get_site_url(); ?>requestpassword #requestpgr');
    Iam getting fine result in mozilla but in IE it is not getting loaded...How can we solve the issue in IE ?

    Rgds
    Tom

  2. #2
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    54
    Thanked 3 Times in 3 Posts

    Default

    The cause of load issue of Jquery in IE is due to the problem of caching OR bad validation of loading file...

    Which is the best Document type that support JavaScript and all major html tags UL LI and more ?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,138
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    Code:
    <?php echo get_site_url(); ?>requestpassword
    Must be a valid HTML document with mime type text/html. If it's not, there could be problems in some browsers.

    Does the page at <?php echo get_site_url(); ?>requestpassword have a name and extension? If so, use them. If it's the index file, try adding the /:

    Code:
    <?php echo get_site_url(); ?>requestpassword/
    You might be better off skipping the #requestpgr part and ensuring instead that:

    Code:
    <?php echo get_site_url(); ?>requestpassword
    serves only the HTML code that you want imported.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    54
    Thanked 3 Times in 3 Posts

    Default

    John

    Thanks for your message.
    Does the page at <?php echo get_site_url(); ?>requestpassword have a name and extension?
    Yes it is a php file requestpassword.php

    You might be better off skipping the #requestpgr part and ensuring instead that:
    It is important for me, otherwise the page will fully loaded in that layer, i need only the request password box.. if iam adding that can u explain the issues happen ?
    If it is working in Mozilla, IE 8 and IE6 then is it fine with other browsers ?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,138
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    Is it:

    Code:
    <?php echo get_site_url(); ?>requestpassword.php
    or:

    Code:
    <?php echo get_site_url(); ?>requestpassword/requestpassword.php
    or something else?

    Whatever it is, you need to put the full path and filename, including the extension in the load() command. Without that, I'm surprised it works in any browser.

    That might be the only problem.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    54
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Is it:

    Code:
    <?php echo get_site_url(); ?>requestpassword.php
    or:

    Code:
    <?php echo get_site_url(); ?>requestpassword/requestpassword.php
    or something else?

    Whatever it is, you need to put the full path and filename, including the extension in the load() command. Without that, I'm surprised it works in any browser.

    That might be the only problem.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

    No The exact url location is <?php echo get_site_url(); ?>requestpassword .. (http://localhost/requestpassword) the coding of requestpassword is in php file. As is said the issue is in IE only, because there is invalid markup in the loading page. That why i asked which is the best Doctype that support javscript and UL Li tags.

    An Example of Doctype
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" id="vbulletin_html">
    More over What is the problem arise if we call a layer in load function (ref to your following quote)
    You might be better off skipping the #requestpgr part and ensuring instead that:
    I can't find any issue for calling these stuff in IE 7 and Mozilla..

    please include a link to the page on your site that contains the problematic code so we can check it out
    If iam including that link , it will waste the time of both of us, because these results and produced from a large lib of functions, No need of that to correct the issue in HTML markup. its indeed an time wasting technique.
    Last edited by letom; 04-25-2013 at 05:49 AM.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,138
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    The DOCTYPE isn't important. Pick any standards invoking DOCTYPE you like. Some will be easier to validate to than others though. Pick the one that has the fewest errors and work from there.

    That link is on your own computer. I will need a live link to be of much more help.

    What I would do is load the page in the browser, perhaps posting to it if need be to get it to load up. Once it's in the browser, it can be validated. However, the browser might be error correcting it, so you may have to compare the view sorce of the browser to the actual code of the page to tell.

    If I had the full code of the page, I might be able to tell something from that.

    The reason why using the #requestpgr might be a part of the problem is that where it is, or how it is there might be more invalid than the rest of the page. You can try loading the entire page into a display none div, then appending the element with the id of requestpgr to your target div. Something like:

    Code:
    var temp = $('<div style="display: none;"></div>').prependTo(document.body);
    temp.load('<?php echo get_site_url(); ?>requestpassword', function(){
    	$('#loader').append('#requestpgr', temp);
    	temp.remove();
    });
    Added Later:

    If the above code doesn't work, it might still write the external page to temp div. If you remove the 2 highlighted lines, you can use IE 8's developer tools to look at the temp div and see what's in there. You can even copy its HTML to run through the validator.

    Another thing I'm thinking is that if requestpassword is a page, give it the php extension and use it with that in the command.
    Last edited by jscheuer1; 04-25-2013 at 12:42 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    letom (04-25-2013)

  9. #8
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    54
    Thanked 3 Times in 3 Posts

    Default

    Thanks for your kind advice.. Yes it is a good idea, if any further issues i will post.
    Also i want to confirm according the above logic, the validations of forms in JavaScript will occur in that loading page ?

    Another thing I'm thinking is that if requestpassword is a page, give it the php extension and use it with that in the command.
    No that php extension will not work, according to the function written the page is only accessed by localhost/requestpassword .. if we are providing the correct path of our page files in JavaScript, it is publicly avial and may cause security issues i mean ? all must see where the design is located

  10. #9
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    54
    Thanked 3 Times in 3 Posts

    Default

    John

    Did u noted this in jquery load function

    While using load function in jquery we don't want to use hide() before loading the next content. I think this load function will automatically hide the current content and displays the next loading content in that place.

    My doubt is if we are not using hide before the next loading content as follows, some browsers will display both content(next loading content and previously loaded content) in the layer #content ?

    Code:
    $('#content').load('<?php echo get_site_url(); ?>login #login');
    
    $('#login').hide();
    $('#content').load('<?php echo get_site_url(); ?>forgotpassword #fgp');
    
    $('#fgp').hide();
    $('#content').load('<?php echo get_site_url(); ?>register #register');
    but iam not using hide now, getting right result in IE 8 and Mozilla
    Last edited by letom; 04-26-2013 at 02:50 PM. Reason: adding more info

  11. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,138
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    Nothing about that in the manual on load:

    http://api.jquery.com/load/

    And it makes no sense to me, the new content is to replace the existing HTML of the target element. I suppose it's possible in some cases. Like with my suggested code, because I use append, if you were to do it a second time, you would have two sets of responses, so should empty() the target:

    Code:
    var temp = $('<div style="display: none;"></div>').prependTo(document.body);
    temp.load('<?php echo get_site_url(); ?>requestpassword', function(){
    	$('#loader').empty().append('#requestpgr', temp);
    	temp.remove();
    });
    What exact code did you end up with that's working? Did you have to change anything on the requestpassword page?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Using jQuery to load menu
    By nonagon in forum JavaScript
    Replies: 4
    Last Post: 04-19-2012, 03:30 PM
  2. JQuery Carousel and JQuery Slider Issue
    By jcdesigns in forum JavaScript
    Replies: 2
    Last Post: 10-06-2011, 02:02 PM
  3. Replies: 0
    Last Post: 10-18-2010, 01:05 PM
  4. jquery .load
    By ggalan in forum JavaScript
    Replies: 8
    Last Post: 09-03-2010, 07:34 PM
  5. jQuery JS Load in a Div Help
    By takuhii in forum JavaScript
    Replies: 3
    Last Post: 01-17-2009, 11:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •