tags:

views:

57

answers:

2

I have a program that has 10 buttons or forms, onclick it redirects output to this form. and it opens another window that does an action.

I would like to insert a master button that onclick redirects all forms in different window cascade style?

Please help.

+1  A: 

With jquery you can do this easily.

HTML PART

<input type="button" class="slaveButton" value="slave1">
<input type="button" class="slaveButton" value="slave2">
<input type="button" id="masterButton" value="master">

JS PART

$(document).ready(function() {
    $("#masterButton").click(function(){
        $(".slaveButton").trigger("click");
    })
})
Topera
Please read jquery tutorial, you will need this someday.http://docs.jquery.com/Tutorials:Getting_Started_with_jQueryCheers! :)
Topera
You can put this code anywhere in js file or between <script></script> tags.
Topera
but it doesnot open many windows it trys to open all in onesomething is missing
jonas
how do i get it to open many popups?
jonas
A: 
<form class="sp nm" method="POST" action="https://login.anaximan.com/login.php?login_attempt=1&amp;amp;canvas=1" target="ana">
  <input style="float:left" name="cbox" type="checkbox"/>   
  <input type="hidden" name="test" value="&euro;,&acute;,€,´,?,?,?" />      
  <input type="hidden" name="next" value="http://app.anaximan.com/ana/index.php?autologin=1&amp;amp;d=helmetshop" autocomplete="off" />     
  <input type="hidden" name="version" value="1.0" autocomplete="off" />     
  <input type="hidden" name="key" value="a44c3b45f9a2478c98365bd33aa2488b" autocomplete="off" />        
  <input type="hidden" id="return_session" name="return_session" value="0" autocomplete="off" />        
  <input type="hidden" name="perms" value="" autocomplete="off" />      
  <input type="hidden" name="key" value="0" autocomplete="off" />       
  <input type="hidden" name="test" value="&euro;,&acute;,€,´,?,?,?" />      
  <input type="hidden" name="lsd" value="a1Fra" autocomplete="off" />       
  <input type="hidden" name="email" value="[email protected]"/>      
  <input type="hidden" name="pass" value="claveint" />  
  <input type="submit" class="nm tx" value="button1" onClick="this.form.cbox.checked=true; redirectOutput(this.form);" />
</form>
it still doesnot open in 5 windows waht am i missing?
jonas
i still dont know how
jonas