javascript - Radio buttons to change iFrame not working -


I'm pretty sure I correct it, I'm using the wrong function, but: & lt; Script & gt; Go to Function (People) {document.getElementById ('iframe'). src = loc; } & Lt; / Script & gt;

In the login details container, iframe which is selected through the page radio button (How do I select the first radio button automatically?)

  & lt; div class = "loginins_details_container" & gt; & Lt ;! - Top Container - & gt; & Lt; iframe id = "iframe" src = "home_schedule_iframe.php" width = "100%" height = "100%" & gt; & Lt; / Iframe & gt; & Lt; / Div & gt; & Lt; Div class = "iframe_container" & gt; & Lt; Form & gt; & Lt; Input type = "radio" name = "iframe" value = "type" onselect = "go ('maths_iframe.php')" /> Mathematics & lt; Br> & Lt; Input type = "radio" name = "iframe" value = "type" onselect = "go ('ict_iframe.php')" /> ICT & lt; / Form & gt; & Lt; / Div & gt;    

All you need to do is use the onClick function Select On .

Then the code will be

Javascript

    

HTML

  & lt; Div class = "loginins_details_container" & gt; & Lt ;! - Top Container - & gt; & Lt; Iframe id = "iframe" src = "home_schedule_iframe.php" width = "100%" height = "100%" & gt; & Lt; / Iframe & gt; & Lt; / Div & gt; & Lt; div class = "iframe_container" & gt; & Lt; Form & gt; & Lt; Input type = "radio" name = "iframe" value = "type" onClick = "go ('maths_iframe.php')" /> Mathematics & lt; Br> & Lt; Input type = "radio" name = "iframe" value = "type" onClick = "go ('ict_iframe.php')" /> ICT & lt; / Form & gt; & Lt; / Div & gt;   

Here is the code to run (it will not be able to load maths_iframe.php and ict_iframe.php ) on the server Are not)

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -