Help with SC button and JScript

Hello guys:

I created a blank application which is called from another blank application using an iframe, In this application i have buttons and whenever you plrease a button a form should be openned in the “iframe_menu” which is the default iframe used for the menu application to open applications.

Well my code is like this but for some reason… i cant get my form to be oppened.


$link = sc_make_link( form_folios_fdview , idfolios = 0 ; reservations_idreservations = 0 );
		echo '<td class="TableTitle" valingn="top"> 
					<font>' . {lang_applbl_OpenMFolios} . '</font>
			  </td>';
		echo '<td valingn="top"> 
					<button class=NewFolio onclick=window.document.getElementById("iframe_menu").src="' . $link . '">
						<table class="null"><tr>
							<td><Font size=8> + </font></td>
							<td>' . {lang_btn_newfolio} . '</td>
						</tr></table>
					</button>
			  </td>';

Any ideas?.

hi dear
remember 2 days ago when struggled with that button issue, at first I wasn’t able even to display the button, then button was there but wasn’t opening the control… finally I changed the theme it all worked ok… obviously there was something wrong or java code conflict to open the application as iframe/modal and it solved when changed the theme… perhaps is all ok in your code, give it a try and see what happnes

valingn ??? a typo?? Did you mean valign ??

Thank you guys for your answers:

rr indeed thats a typo but I’m affraid has nothing to do with the problem at hand.

Mike, the situation here is that I’m using a blank application (I’m cooding everything even the buttons) but when i use the jscript event is not working, when I analize the execution of thepage I get this

Uncaught TypeError: Cannot set property ‘src’ of null

so for some reason jscript is not fiding the iframe_menu iframe into the html code… I’ve tried several things but its not working T -T

oh

then there is one guy I know can definitely help with whatever related to js stuff :slight_smile:

lets hope he appears soon, sometimes he disappears for a while, but always comes back to bright some stucky issues

who knows, may suddenly see him around :smiley: yes, jsb the king :cool:

oh

well, there is one guy I know can definitely help with whatever related to js stuff :slight_smile:

lets hope he appears soon, sometimes he disappears for a while, but always comes back to bright some stucky issues

who knows, may suddenly see him around :smiley: yes, jsb the king indeed :cool:

Hey guys… i solved it in a very not quite my style manner lol.


$link = sc_make_link( form_folios_fdview , idfolios = 0 ; reservations_idreservations = 0 ); 
        echo '<td class="TableTitle" valingn="top">  
                    <font>' . {lang_applbl_OpenMFolios} . '</font> 
              </td>'; 
        echo '<td valingn="top">  
                    <button class=NewFolio onclick=parent.parent.parent.document.getElementById("iframe_menu").src="' . $link . '"> 
                        <table class="null"><tr> 
                            <td><Font size=8> + </font></td> 
                            <td>' . {lang_btn_newfolio} . '</td> 
                        </tr></table> 
                    </button> 
              </td>';  


for some reason the jquery was only using the elements in the iframe so i had to make an “absolute path” so to speak to it.

=D

good job, thanks for sharing it as well dude