Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENT: Help with function call

Status
Not open for further replies.

SmileyFace

Programmer
Sep 10, 2002
99
0
0
US
Someone please help! This is very frustrating. I am trying to call a vbscript function using a link on my page. This function basically posts a form action. But for some reason it won't execute. Please tell me what I am doing wrong.

This is the link:
<A class=mainmenu href=&quot;vbscript:fignore()&quot; >Exit</A>

This is the function:

function fignore
msg = msgbox (&quot;Save changes?&quot;, 4, &quot;Title&quot;)
if msg = &quot;6&quot; then
window.custisrnotes.action = &quot;cust-isrnotes.asp? Action=S&shpno=<%=shpno%>&quot;
end if
end function

If I click on the link, it brings up a msgbox asking if I want to save changes. If yes, it is supposed to call the cust-isrnotes.asp page but it doesn't do anything. PLEASE HELP!

Thanks!
 
you need to submit the form

try this

function fignore
msg = msgbox (&quot;Save changes?&quot;, 4, &quot;Title&quot;)
if msg = &quot;6&quot; then
window.custisrnotes.action = &quot;cust-isrnotes.asp? Action=S&shpno=<%=shpno%>&quot;
window.custisrnotes.submit()

end if
end function
 
Sarkman,

Thanks a lot!! That worked. I can't belive I missed that! Thing is I was using the same line in another procedure and it wored without the submit(). But I realize thats coz the call was for that was made from a form submit button. :)

Anyways, thanks a bunch again! I was going nuts!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top