Have the JavaScript submitting a form.

<script language="JavaScript">
function Menu()  {
    var answer = confirm ("Return to Main Menu now?")
    if (answer)
    document.myform.submit()
 } 
</script>

<form name=myform method=post action=mypgm1.pgm>
<input type=hidden name="UserName" value="/%UserName%/">
</form>


----- Original Message ----- 
From: "itpweb1" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, February 03, 2006 6:08 PM
Subject: [Easy400Group] Javascript window.location question


>I want to use a Javascript function to confirm that user really 
> wants to go to main menu, and if he responds "OK" use window.location
> to take him there.  However I don't want to see paramters in the URL. 
> 
> Is there a way to accomplish this as a 'post' instead of a 'get' ?
> 
> example:
> 
> function Menu()
> {
>   var answer = confirm ("Return to Main Menu now?")
>   if (answer)
>   window.location="mypgm1.pgm?UserName=/%UserName%/"
> } 
> 
> .
> .
> .
> 
> <form name="form1" method="post" action="javascript:Menu()">
> <input type="submit" name="Menu" value=" Main Menu" class="btn"> 
> </form>
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
>



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Easy400Group/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to