skot Posted October 5, 2008 Share Posted October 5, 2008 Hi I've been trying to use javascript to show a hidden span containing instructions when a form is submitted with no luck so far.. Basically when the form is submitted, onclick should run a couple of functions, one sets the button text to read something else and the other should show instructions hidden in a span with style="display:none". The button is renamed on clicking, but I cannot get the hidden span to show up. What am I doing wrong? I've tried various things including trying to get function remoteConnect() to unhide the span or getting it to run function showSpan(answer1).. Button:- <input name="submit" type='submit' class="connectbutton" style="border: 1px groove rgb(0, 0, 0); text-align: center; background-color:#FFCC00; width:200px" value='Connect to Support' onclick="remoteConnect(); showSpan('answer1'); return false;" /> Javascript:- <script language="JavaScript"> function remoteConnect() { document.channel296606886.submit.value = 'Loading.. Please wait..'; document.channel296606886.submit(); } </script> <script language="JavaScript"> function showSpan(id) { document.getElementById(id).style.display = 'block'; } </script> Hidden Span:- <span id="answer1" style="display:none"> <p class="boxontop style15 style16 style17">Select 'Open' followed by 'Run' when prompted</p> </span> Quote Link to comment Share on other sites More sharing options...
skot Posted October 5, 2008 Author Share Posted October 5, 2008 this has been sorted Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.