Results 1 to 2 of 2

Thread: easy string question

  1. #1

    Thread Starter
    Fanatic Member wildcat_2000's Avatar
    Join Date
    Nov 2000
    Location
    Italy
    Posts
    727

    easy string question

    hello,

    i'm getting CRAZY on something that should be stupid. here it goes. this is the script:

    function ConfirmRemove(a_id, s_id, n_id)
    {
    if (confirm("Are you sure to remove the article " + n_id + "? This operation CANNOT BE UNDONE.") )
    {
    parent.location='catmod_article_delete.asp?article_id=' + a_id + '&subcat_id=' + s_id;
    parent.target='body';
    }
    }

    i call it with a onSubmit="ConfirmRemove(1, 1, "name").

    if instead of "name" i put a number everything works perfect, if i leave this "name" i get message errors all over the place... what am i doing wrong??

    thank you in advance for your help!

    cheers,

    w.
    When your car breaks down,
    close all windows and retry

    => please rate all users posts! <=

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    try onSubmit="ConfirmRemove(1, 1, 'name')" instead of onSubmit="ConfirmRemove(1, 1, "name")".
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

Posting Permissions

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



Click Here to Expand Forum to Full Width