473,544 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript now working in IE, only FF

4 New Member
This script is not done yet... but i wont finish it before i can make it work in IE...

What is the reason this script wont work in IE??



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Unname d</title>
<script type="text/javascript">

function nextButton() {

next = document.nexty. nexty1.value

if (next == "next")
{
document.write( "lol")
<!--
window.location .replace("thisi snext.html") ;
// -->
}
else if (next != "next")
{
alert("now thats bad");
}

}
</script>
<link rel="stylesheet " type="text/css" href="dos.css" />
</head>

<body>
<table id="table_01" border="1">
<tr>
<td height="300" width="500" valign="top">
Microsoft Windows XP [Versjon 5.1.2600]
<br />
(C) Copyright 1985-2001 Microsoft Corporation
<p></p>

<form name="nexty" id="nexty" action="">
C:\Windows&gt;< input type="text" name="nexty1" id="nexty1" onchange="nextB utton()" autocomplete="o ff" />
</form>

</td>
</tr>
</table>

</body>
</html>
Nov 2 '06 #1
6 1686
vee10
141 New Member
hi,

The code u send is working what is the error u r getting

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <title>Unnamed</title>
  9. <script type="text/javascript">
  10.  
  11. function nextButton() {
  12.  
  13. next = document.nexty.nexty1.value
  14.  
  15. if (next == "next")
  16. {
  17. document.write("lol"); 
  18. window.location.replace("thisisnext.htm") ; 
  19. }
  20. else if (next != "next")
  21. {
  22. alert("now thats bad");
  23. }
  24.  
  25. }
  26. </script>
  27. <link rel="stylesheet" type="text/css" href="dos.css" />
  28. </head>
  29.  
  30. <body>
  31. <table id="table_01" border="1">
  32. <tr>
  33. <td height="300" width="500" valign="top">
  34. Microsoft Windows XP [Versjon 5.1.2600]
  35. <br />
  36. (C) Copyright 1985-2001 Microsoft Corporation
  37. <p></p>
  38.  
  39. <form name="nexty" id="nexty" action="">
  40. C:\Windows&gt;<input type="text" name="nexty1" id="nexty1" onchange="nextButton()" autocomplete="off" />
  41. </form>
  42.  
  43. </td>
  44. </tr>
  45. </table>
  46.  
  47. </body>
  48. </html>
  49.  

thisisnext: for example i have taken

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitl ed Page</title>
</head>
<body>
<input id="Button1" style="z-index: 100; left: 256px; position: absolute; top: 128px"
type="button" value="button" onclick="alert( 'hai');" />

</body>
</html>























This script is not done yet... but i wont finish it before i can make it work in IE...

What is the reason this script wont work in IE??



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Unname d</title>
<script type="text/javascript">

function nextButton() {

next = document.nexty. nexty1.value

if (next == "next")
{
document.write( "lol")
<!--
window.location .replace("thisi snext.html") ;
// -->
}
else if (next != "next")
{
alert("now thats bad");
}

}
</script>
<link rel="stylesheet " type="text/css" href="dos.css" />
</head>

<body>
<table id="table_01" border="1">
<tr>
<td height="300" width="500" valign="top">
Microsoft Windows XP [Versjon 5.1.2600]
<br />
(C) Copyright 1985-2001 Microsoft Corporation
<p></p>

<form name="nexty" id="nexty" action="">
C:\Windows&gt;< input type="text" name="nexty1" id="nexty1" onchange="nextB utton()" autocomplete="o ff" />
</form>

</td>
</tr>
</table>

</body>
</html>
Nov 2 '06 #2
decree
4 New Member
it wont work in IE for me :P

when i type in stuff nothing happens what so ever :P

or... if i liek... type "something"

it changes from

http://localhost/jstest.html

http://localhost/jstest.html?nex ty1=something

But it wont activate the functions for me...
Works fine in FF... but in IE nothing happens
Nov 2 '06 #3
decree
4 New Member
The headline is a bit confusing actually... Becuase i got a typo...

This was supposed to be:

Javascript not working in IE, only FF
Nov 2 '06 #4
vee10
141 New Member
hi,

i got the problem what ur getting upto know i am clicking with mouse but not pressing enter ok



it wont work in IE for me :P

when i type in stuff nothing happens what so ever :P

or... if i liek... type "something"

it changes from

http://localhost/jstest.html

http://localhost/jstest.html?nex ty1=something

But it wont activate the functions for me...
Works fine in FF... but in IE nothing happens
Nov 2 '06 #5
decree
4 New Member
Problem solved... I think! ^^

instead of onchange thingy...
i now use

onkeydown="if(e vent.keyCode==1 3) nextButton()"

this works perfectly!
Nov 2 '06 #6
vee10
141 New Member
hi,

i got the solution for it code is as shown

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <title>Unnamed</title>
  9. <script type="text/javascript">
  10.  
  11. function nextButton() {
  12.  
  13. next = document.nexty.nexty1.value;
  14. //alert(next);
  15. if(window.event.keyCode ==13)
  16. {
  17. if (next == "next")
  18. {
  19. document.write("lol"); 
  20. window.location.replace("thisisnext.htm") ; 
  21. }
  22. else
  23. {
  24. alert("now thats bad");
  25. }
  26.  
  27. }
  28. }
  29. </script>
  30. <link rel="stylesheet" type="text/css" href="dos.css" />
  31. </head>
  32.  
  33. <body>
  34. <table id="table_01" border="1">
  35. <tr>
  36. <td height="300" width="500" valign="top">
  37. Microsoft Windows XP [Versjon 5.1.2600]
  38. <br />
  39. (C) Copyright 1985-2001 Microsoft Corporation
  40. <p></p>
  41.  
  42. <form name="nexty" id="nexty" action="">
  43. C:\Windows&gt;<input type="text" name="nexty1" id="nexty1"  onkeypress="nextButton();" />
  44. </form>
  45.  
  46. </td>
  47. </tr>
  48. </table>
  49.  
  50. </body>
  51. </html>
  52.  
  53.  
  54.  
  55.  












hi,

i got the problem what ur getting upto know i am clicking with mouse but not pressing enter ok
Nov 2 '06 #7

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

Similar topics

10
4557
by: VictorG | last post by:
Hello, I am new to JS and am trying to add some HTML into a JS function. So that when called the script as well as the HTML will be invoked. Is there some type of embed mechanism, sort of the reverse of embedding JS in an html page with the script tag. (which is what I am doing in this case) Is this even possible?
136
9213
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to...
1
2639
by: Muhammad Abdullah | last post by:
Hi am having some problems with the javascript confirm. i have it working fine on one page and it doesnt even pop up at the other. The code on the working page is, private void Page_Load(object sender, System.EventArgs e) { if(! Page.IsPostBack)
1
18838
by: den2005 | last post by:
Hi everybody, I am confused and still looking why this codes is not working. Can anyone notice or know why this code is not working? Thanks in advance. Code working: <form id="form1" runat="server"> <div> &nbsp;</div> <div>
11
2763
by: Nathan Sokalski | last post by:
I add several JavaScript events (onchange, onkeypress, etc.) to Controls using the Add method of the Attributes collection. However, if the JavaScript code contains certain characters, such as & or < or several others, it converts them to html, such as &amp; or &lt; which can sometimes cause my scripts not to work. How can I prevent ASP.NET from...
0
7449
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7385
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7642
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7405
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7737
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4938
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3432
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1861
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
688
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.