473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to add SRC and event Script in same <Script>?

Hi please anybody help me..

Expand|Select|Wrap|Line Numbers
  1. <script language="java" type="text/javascript" src="datetimepicker.js"> 
in the script i add src="datetimepicker.js".
For combo box also i put some scripting for generating dynamic combo box. so i put the event script
after this
Expand|Select|Wrap|Line Numbers
  1. <script language="java" type="text/javascript" src="datetimepicker.js">
  2.  
  3. event script...
  4.  
  5. </script>
  6.  
but event script is not running i don't know Y?
if i remove SRC in Script head event script is working.
Expand|Select|Wrap|Line Numbers
  1. <script language="java" type="text/javascript">
  2. event script
  3.  
  4. </script>
  5.  
Please.....
please help me..

i need both to run.. HELP ME.,
i'm Sitting in this for 2 day's
Please Help me...,
Jan 19 '11 #1
7 2064
Dormilich
8,658 Expert Mod 8TB
remove language="java" and put the inline code in separate script tags (you can either have JavaScript code between the tags or load an external JavaScript source).
Jan 19 '11 #2
S i put in separate Script tags it is working thanks DORMILICH..,
my code:
Expand|Select|Wrap|Line Numbers
  1. <script language="java" type="text/javascript" src="datetimepicker.js">
  2. </script>
  3.  
  4. <script language="java" type="text/javascript"
  5. event script...
  6. </script>
  7.  
i need one more help..,
get the user input in text box(in that text box).that text box for hours(HH:MM:SS)(01:33:59)

Please help me..,
Jan 19 '11 #3
Dormilich
8,658 Expert Mod 8TB
get the user input in text box(in that text box).that text box for hours(HH:MM:SS)(01:33:59)
what have you tried?
Jan 19 '11 #4
i have display the current time in text box.But my HR said user want to enter time in the text box. I'm newly joined in company for (JSP,JSF) dis is exercise i need to complete as soon as possible
below code for getting current time in text box
script CODE:
Expand|Select|Wrap|Line Numbers
  1. <script language="Javascript">
  2. setInterval("settime()", 1000);
  3.  
  4. function settime () {
  5.   var curtime = new Date();
  6.   var curhour = curtime.getHours();
  7.   var curmin = curtime.getMinutes();
  8.   var cursec = curtime.getSeconds();
  9.   var time = "";
  10.  
  11.   if(curhour == 0) curhour = 12;
  12.   time = (curhour > 12 ? curhour - 12 : curhour) + ":" +
  13.          (curmin < 10 ? "0" : "") + curmin + ":" +
  14.          (cursec < 10 ? "0" : "") + cursec + " " +
  15.          (curhour > 12 ? "PM" : "AM");
  16.  
  17.   document.frm.dil_Hours.value = time;
  18. }
  19. </script>
  20.  
Form CODE:
Expand|Select|Wrap|Line Numbers
  1. <input type="Text" name="dil_Hours" id="dil_Hours">
  2.  
if u find any sample code for getting user input for time .. please send that code to me.
thanks for ur reply Dormilich.
Jan 19 '11 #5
Dormilich
8,658 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. var time = document.frm.dil_Hours.value;
Jan 19 '11 #6
Hi,

U Know JSP..,
Jan 19 '11 #7
Dormilich
8,658 Expert Mod 8TB
no .
Jan 19 '11 #8

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

Similar topics

6
by: Lasse | last post by:
I have done this simple function, it seems to work as intended, to solve a problem i have had for a while. I couldnt find any sample around that was working for me. I would like to test it with...
9
by: Wang, Jay | last post by:
Hello, all, I would like to enable some text between <SPAN url="http://www.testserver.com/">WORD TO BE DRAGGED </SPAN>. I put some javascript and it will extract http://www.testserver.com/ from...
3
by: Don | last post by:
Hi all, Is there some way in a <form> tag to transfer control to a JavaScript function after completion of the submit, where the <form> and function are on the same page? I believe ONSUBMIT and...
11
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
21
by: hemant.singh | last post by:
Hello all, I am try'g to send window.location.href to the server script who will generate dynamic javascript according to the referral name comg in as param Now bcz <script language="javascript"...
8
by: deko | last post by:
<head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>Home Page</title> <!--> <style#navlist a { height: 1em; } </style> <!--> </head> Is the statement above...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
1
by: otiose3 | last post by:
I've been ploughing through the archives here, but I can't seem to find a solution for my situation... Essentially, I want to run the JQuery script that is in the "value" attribute of my <option>...
0
by: Ty | last post by:
I have an example I have been playing with. The page displays with a vertical menu (like an outlook menu) which is built from a table. When the page loads the menu is collapsed. If you click on...
1
by: VaidehiPawar | last post by:
I am a beginner level in xml..my output page does not convert &gt &lt it shows something like this " &lt;b&gt;Location.&lt;/b&gt;&lt;br /&gt; &lt;UL&gt;&lt;LI&gt;Park Central New York " can anyone help? here is my code ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.