473,395 Members | 1,652 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,395 software developers and data experts.

Question on using javascript in links

I have a simple javascript that reads xml data from my site using the
XMLHttpRequest/ActiveXObject function, which later clears a predefined
div and updates it with the requested data, to update I am using:

<a href="javascript:function">yada</a>

It works as it should in Firefox, but when in IE6 it does not, no error
is reported. Am I missing something obvious? Also there is no action on
the server when clicked (I am running a small webserver I built)
alternatively I have used a <span onClick="function">yada</span> and
same song and dance, with the spyblocker off, still no cigar.

Any help is greatly appreciated.

Adonis
Jul 23 '05 #1
3 1125
Adonis wrote:
<a href="javascript:function">yada</a>
http://jibbering.com/faq/#FAQ4_24
It works as it should in Firefox, but when in IE6 it does not, no error
is reported. Am I missing something obvious?


Maybe, certainly we are - the code that doesn't work. Try providing a URL.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2

Adonis wrote:
I have a simple javascript that reads xml data from my site using the XMLHttpRequest/ActiveXObject function, which later clears a predefined div and updates it with the requested data, to update I am using:

<a href="javascript:function">yada</a>
it's maybe very easy: brackets are missing after function

It works as it should in Firefox, but when in IE6 it does not, no error is reported. Am I missing something obvious?
if it's not so easy
try somthing to check the functionality in ie, like
<a href="javascript:alert("somthing")">yada</a>.

alternativly you could use
<a href="#" onclick="function()">yada</a>
Also there is no action on
the server when clicked
it's javascript, there should be some action in the browser first, and
if nothing happens there nothing will happen on the server either.
(I am running a small webserver I built)
alternatively I have used a <span onClick="function">yada</span> and
same song and dance, with the spyblocker off, still no cigar.

Any help is greatly appreciated.

Adonis


micha

Jul 23 '05 #3
micha wrote:
Adonis wrote:
I have a simple javascript that reads xml data from my site using
the XMLHttpRequest/ActiveXObject function, which later clears a
predefined div and updates it with the requested data, to update
I am using:

<a href="javascript:function">yada</a>


it's maybe very easy: brackets are missing after function


.... considering that `function' is but a placeholder like `foo' here;
`function' must not be used as identifier, it is a reserved word.

And micha, please trim your quotes:
<http://www.jibbering.com/faq/faq_notes/pots1.html#ps1Trim>
PointedEars
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I...
2
by: David McCulloch | last post by:
Although I am able to drag and drop HTML links, I am no longer able to drag Javascript links. In the past, I have been able to drag a link from such places as the TinyURL! link on...
12
by: daniel kaplan | last post by:
Hi All, Been learning Javascript (via google) to create forms with pre-set values. As seen below. My problem I have found is this: I can't seem to figure out (or find so far via google) how to...
3
by: Weston C | last post by:
I'm coding up a small little script that's supposed to be used to display the number of hours until the US Financial markets open/close. Naturally, this involves getting the current time on the...
2
by: cotton_gear | last post by:
Hi, Depending on the user input I need to disbale/enable some of the links in my page. When disbled I need to display the links as normal text with cursor changed to mouse pointer style and when...
11
by: srinivas | last post by:
Hi all, I have one requirement.Is there any way to create a line graph using javascript.If it is please send me the sample code.But the thing is it should work in all browsers. Thanks,...
1
by: Gerald Shastri | last post by:
Hi, I have a page which is being generated by a CMS and I can't control the links which are being outputted. I want to add a target = "_parent" attribute to all the links on my page using...
3
by: akristensen | last post by:
I am new to this site, so be patient if I do not ask the question correctly. Current Target Platform: Browser: MS IE, script language: Javascript (will use VBScript, but JS is preferred), External...
6
by: John | last post by:
Hello, I was thinking of trying out JavaScript and learn it on my own. I had a few questions though. Is it still popular with businesses today? Is JavaScript bad for search engine opt....
3
by: zac540 | last post by:
Hey everyone! First of all I'd like to say that I did my best to look for any other relevant posts. The best I found was this interesting thread.. http://bytes.com/forum/thread594982.html If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.