.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> JavaScript/VBScript >> Post New QuestionBookmark and Share Subscribe to Forum

JAVASCRIPT

Posted By: pasaway cool     Posted Date: September 26, 2011    Points:5   Category :JavaScript/VBScript

Hi ,

Please help me I'm having hard time incorporating the button on the previous workings script.I just don't want to click the H or RB link but I also want to add or incorporate the form with input and button part but still able to have same output when I click it.Thanks.

<html>
<head>
<SCRIPT LANGUAGE="JavaScript">

<!--

function display (Name, Number, Weight, Melt, Freeze) {
document.table.name.value=Name;
document.table.number.value=Number;
document.table.weight.value=Weight;
document.table.melt.value=Melt;
document.table.freeze.value=Freeze;
}

// -->

</script>
</head>

<BODY>

<!-- THIS FORM IS WORKING // -->
<form>

<table cellspacing=2 cellpadding=0 width=500>

<tr>

<td align=center bgcolor="#FFE4C4"><a

href="javascript:display('Hydrogen','1','1.0079','-259.14C','-252.87C');">

H</a></td>

<td colspan="16"></td>

<td align=center bgcolor="#5F9EA0"><a

href="javascript:display('Rubidium','37','85.467','38.89 C','688 C');">Rb</a></td>
</tr>

</table>

</form>

<form name="table">

<table width="500">

<tr>

<td align="center" width="33%">Name</td>

<td align="center" width="33%">Number</td>

<td align="center" width="33%">Weight</td>

</tr>

<tr>

<td align="center" width="33%"><input type="text" name="name" value=" " size="14"></td>

<td align="center" width="33%"><input type="text" name="number" value=" " size="6"></td>

<td align="center" width="33%"><input type="text" name="weight" value=" " size="16"></td>

</tr>

<tr>

<td align="center" width="33%">Melts</td>

<td align="center" width="33%"></td>

<td align="center" width="33%">Boils</td>

</tr>

<tr>

<td align="center" width="33%"><input type="text" name="melt" value=" " size="18"></td>

<td align="center" width="33%"></td>

<td align="center" width="33%"><input type="text" name="freeze" value=" " size="18"></td>

<!-- I want to Convert and incorporate this to working script> // -->

<td>Input Chemical Symbol</td>

<td><input type="text" size="20" maxlength="20" name="number"></td>

<td align=center colspan=2 BGCOLOR="#B6D4D2">
<input type="button" value="Chemical Symbol" onClick="display();">&nbsp;&nbsp;&nbsp;<input type="reset" value="Clear Values">

do
</tr>

</table>

</form>
</html>

Responses
Author: Narayanan          Accepted Answer   
Posted Date: September 26, 2011     Points: 40   

Hi,
What is your query?

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: pasaway cool             
Posted Date: September 26, 2011     Points: 20   



Hi NARAYANAN,

Please help me I'm having hard time incorporating the button on the previous workings script.I just don't want to click the H or RB link but I also want to add or incorporate the form with input and button part but still able to have same output when I click it.Thanks.

<html>
<head>
<SCRIPT LANGUAGE="JavaScript">

<!--

function display (Name, Number, Weight, Melt, Freeze) {
document.table.name.value=Name;
document.table.number.value=Number;
document.table.weight.value=Weight;
document.table.melt.value=Melt;
document.table.freeze.value=Freeze;
}

// -->

</script>
</head>

<BODY>

<!-- THIS FORM IS WORKING // -->
<form>

<table cellspacing=2 cellpadding=0 width=500>

<tr>

<td align=center bgcolor="#FFE4C4"><a

href="javascript:display('Hydrogen','1','1.0079','-259.14C','-252.87C');">

H</a></td>

<td colspan="16"></td>

<td align=center bgcolor="#5F9EA0"><a

href="javascript:display('Rubidium','37','85.467','38.89 C','688 C');">Rb</a></td>
</tr>

</table>

</form>

<form name="table">

<table width="500">

<tr>

<td align="center" width="33%">Name</td>

<td align="center" width="33%">Number</td>

<td align="center" width="33%">Weight</td>

</tr>

<tr>

<td align="center" width="33%"><input type="text" name="name" value=" " size="14"></td>

<td align="center" width="33%"><input type="text" name="number" value=" " size="6"></td>

<td align="center" width="33%"><input type="text" name="weight" value=" " size="16"></td>

</tr>

<tr>

<td align="center" width="33%">Melts</td>

<td align="center" width="33%"></td>

<td align="center" width="33%">Boils</td>

</tr>

<tr>

<td align="center" width="33%"><input type="text" name="melt" value=" " size="18"></td>

<td align="center" width="33%"></td>

<td align="center" width="33%"><input type="text" name="freeze" value=" " size="18"></td>

<!-- I want to Convert and incorporate this to working script> // -->

<td>Input Chemical Symbol</td>

<td><input type="text" size="20" maxlength="20" name="number"></td>

<td align=center colspan=2 BGCOLOR="#B6D4D2">
<input type="button" value="Chemical Symbol" onClick="display();">&nbsp;&nbsp;&nbsp;<input type="reset" value="Clear Values">

do
</tr>

</table>

</form>
</html>

Author: Narayanan             
Posted Date: September 29, 2011     Points: 20   

Hi,
in My assumption, user clicks a "H"/"RB" option in the screen.user view some information.am i right? what is purpose of "Chemical Symbol"?what is your expectation?
Regards
Lakshmi Narayanan.s

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend