By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,848 Members | 3,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,848 IT Pros & Developers. It's quick & easy.

Div content shown in new web page

P: 4
Hi
I am facing a problem. In the combo box when i select on option than i want to open a web page in the new window and the related data shown on that web page that i open in the new window. Please help me out.

Thanks

sunil
Oct 23 '08 #1
Share this Question
Share on Google+
4 Replies


gits
Expert Mod 5K+
P: 5,235
what have you done so far? please describe a bit more what data you want to have in the new window ...

kind regards
Oct 23 '08 #2

P: 4
what have you done so far? please describe a bit more what data you want to have in the new window ...

kind regards
simple div shown with the same id that in the option and the div.
Oct 23 '08 #3

gits
Expert Mod 5K+
P: 5,235
since we are not supposed to provide full solutions here, please show the code you already have tried. the basic idea is to use the onchange-event of the select-element to call a JavaScript-function the open()s a window and passes the desired data to the new open window that you might reference from the opener. you could even use a variable to store a reference to the new window in the window from where you open it.

kind regards
Oct 23 '08 #4

P: 4
since we are not supposed to provide full solutions here, please show the code you already have tried. the basic idea is to use the onchange-event of the select-element to call a JavaScript-function the open()s a window and passes the desired data to the new open window that you might reference from the opener. you could even use a variable to store a reference to the new window in the window from where you open it.

kind regards
[HTML]<body>
<form id="Mainfrm" name="Mainfrm">
<select name="state" size="1" onChange="javascript:window.open('newpage.html','m ywin','width=715,height=700');"-->
<option value="" selected>Choose a State</option>
<option value="six">Alabama</option>
<option value="six">Alaska</option>
</select>
</form>



<!-- I want to show is div with the same data in the new window webpage the div id and the option value is the same-->

<div id="six" class="hiddenDiv">
<span>Sales Person : Al Theriot</span>
<table border="1" cellpadding="0" cellspacing="0">
<tr><td width="10%"></td><td>Sun.Nov.30,2008</td><td>Mon.Dec.01,2008</td>
<td>Tues.Dec.02,2008</td><td>Wed.Dec.03,2008</td><td>Thurs.Dec.04,2008</td></tr>
</table>
</div>

</body>[/HTML]
please help me out.
Oct 23 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.