Results 1 to 8 of 8

Thread: this simple code works in firefox, but doesn't work on googlecrome, can anyone fix?

  1. #1
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Arrow this simple code works in firefox, but doesn't work on googlecrome, can anyone fix?

    this simple code works in firefox, but doesn't work on googlecrome, can anyone fix?

    Code:
    function save_select_image(media_id, str_action)
    {
    	document.getElementById("icon_for_member").value = str_action;
    	document.getElementById("media_id").value = media_id;
    	document.forms["mood_icons_form"].action = "processing/moodGeneral.php?select_image=on";
    	document.forms["mood_icons_form"].target = "mood_process";
     
    	document.forms["mood_icons_form"].submit();
    }

    the googloe crome inspector said :
    Code:
    Uncaught TypeError: Object #<a NodeList> has no method 'submit' http://smansakra.jwnmedia.com/smansakra.net.tc/a.php (line 157)
    can anyhone here help to tix this code?

    thanks
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

  2. #2
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    does google crome not support this below code?
    Code:
    document.forms["mood_icons_form"].submit();
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by smansakra View Post
    does google crome not support this below code?
    Code:
    document.forms["mood_icons_form"].submit();
    In general, Chrome does support it. There is some other problem. For instance, there appears to be no form on that page by that name.
    - John
    ________________________

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

  4. #4
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default hum

    In general, Chrome does support it. There is some other problem. For instance, there appears to be no form on that page by that name.
    hello.... john..
    the form is on my page, all are ok on firefox, ie, and opera, but it is error on crome, ok i will investigate it..
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    I couldn't find the form in your source code.
    - John
    ________________________

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

  6. #6
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default hi

    Quote Originally Posted by jscheuer1 View Post
    I couldn't find the form in your source code.
    john, my form is visible just for member only, i will fix it my self,

    i think becouse crome is still new and it's first release, so it's not as powerfull as firefox
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,192 Times in 3,155 Posts
    Blog Entries
    12

    Default

    It's not a matter of power. Chrome is similar to Safari and other KHTML based browsers. Yes these are different than Firefox which is based on the Mozilla browser code. And, yes Firefox has add ons that give it perhaps the most utility of any browser. However, I tested the the document.forms['form_name'].submit() method in Chrome, and it works just fine in that browser. So, as I say, there must be some other problem.
    - John
    ________________________

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

  8. #8
    Join Date
    Aug 2008
    Location
    karanganyar, solo, indonesia
    Posts
    161
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    hum, you're right, it always still error...

    my code must be not tidy
    ///////////////////////////////////////////////////
    ///// http://www.mediatutorial.web.id
    ///////////////////////////////////////////////////

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
  •