in reply to Javascript in CGI header

Apparently no body likes javascript here, And this is more a javascript question than perl.

Anyway, Your javascript code should look like this

if ( confirm('are you sure you want to use the name' + sname) ) { return true; }else{ return false; }

when your javascript function returns false, your form wont be submitted, so you don't need to refresh the page.

When OK clicked the form will be submitted and you'll have to do the rest through your perl code.

Replies are listed 'Best First'.
Re^2: Javascript in CGI header
by Anonymous Monk on Feb 01, 2010 at 13:09 UTC
    Apparently no body likes javascript here, And this is more a javascript question than perl

    You know what they say about assumptions?

      Many people, said many things. It depends on what quote you're referring to.

        I think anonymous monk is refering to the quote they posted, which is taken from your post:

        "Apparently no body likes javascript here"

        JavaScript is discussed fairly often in the CB, it's pros and cons and general 'how do I achieve X in JavaScript' style questions.