Jump to content

Javascript not working


jaymc

Recommended Posts

In some browsers this isnt working

 

onsubmit="q14();return false;window.top.frames['chatadd'].location.href='http://site.com';"

 

It doesnt like that return false bit, anything after that wont execute

 

I have had this issue before, what is the way around it

It depends on what you're trying to do. When you call return false within an event handler (such as onclick), that's exactly what it does: returns false to the handler call, and therefore essentially stops all processing after that. If you'll define exactly what you're trying to do, we can help you write a JS function that will process everything, and then you can return a value (whether true, false or something entirely different) to the page.

Here is the q14()

 

function q14(){if(lock==0){if(eeL.value.length>0){ajx_line=eeL.value;eeL.value='';stlB=stlB.toString();stlI=stlI.toString();stlU=stlU.toString();stlC=stlC.toString();ajx_lbiu=stlB+stlI+stlU;ajx_lclr=stlC;q00();if(typeof chat_tout=='number'){clearTimeout(chat_tout)}q22();}}}

 

how come you don't just put the return false last?

onsubmit="q14();window.top.frames['chatadd'].location.href='http://site.com';return false;"

--that would keep the form from actually submitting and load a new url in one of your frames

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.