 |
 |
Index ‹ javascript
|
- Previous
- 1
- Trying to get a list of available JavaScript functions/methodsHi all,
I'm trying to get list of JavaScript methods/functions in a script
file in much the same a good text editor will, the difference being
that I need to output it to a file or stdout, or some other way of
"getting at it" automatically. I'm not fussy about what language I
use, be it JavaScript or something else. Anyone got any ideas? I've
tried Exuberant Ctags, but that does not seem to work on very advanced
scripts like Ext.
I'm guessing the best way would be to have some kind of interrogation
of a HTMLScriptElement or something, but I can't see how to get a
simple list of functions/methods from that.
Alternatively, any C library for parsing JS might be a good idea, even
Python, Perl, PHP, whatever really, anyone got any recommendations?
Cheers
Garry
- 1
- Javascript - Event Propagation (iframe to enclosed html)If i have an iframe from within an HMTL document:
Iframe.htm:
------------------------------
<html>
<head>
<title>Iframe.htm</title>
</head>
<body>
<iframe src="sample.htm"></iframe>
</body>
</html>
And this iframe loads the src=Sample.htm below:
Sample.htm
-------------------------------
<html>
<head>
<title>Sample.htm</title>
<script language="JavaScript">
function fireClickFunctions(){
alert('do lots of stuff');
}
</script>
</head>
<body>
<b onClick="fireClickFunctions();">CLICK ME</b>
</body>
</html>
How can i capture an onClick event from within the calling iframe document
(not
using a cookie or something)? Any ideas?
Wendi Turner
email***@***.com
- 1
- inserting text into textarea dynamicallyhow can i use a javascript function to insert dynamic text into
textarea based on the returned values of an array?
thanks. have read the dom but can't find any options to do this.
- 3
- outerhtml questionIn understanding how this works, would it not be possible then to replace an
item with another?
For instance, I have the first paragraph of "Lorem Ipsum" shown in a
division.
At the bottom is a ling showing "next".
Click on the link, the next paragraph replaces te previous.
<p id="lorem1">lorem ipsum stuff.</p>
<p id="lorem2">paragraph 2 stuff.</p>
I attempted to use the "Textual tooltip" swapping routine at Dynamicdrive,
but the code killed the other script for the menu.
What I'm looking for is a simple swap method, like image swapping, without
the use of z-index.
Also, if outerhtml is a solution to my problem, then could I have all the
paragraphs needed on an external page so that the various paragraphs do not
load with the main page?
If you must have a reference see www.somestuff.batcave.net/menu1.html
- 3
- Nearly The Whole Of The Internet Is NOT W3C ValidEh unfortunately Google groups does not provide any longer a way to
reply to the group for older posts (though the one I am referring to is
not older than one month), and I happen to come back to this after life
has asked my attention elsewhere for a while :-)
Yet I think your point deserves a reply.
You were referring to:
http://www.unitedscripters.com/spellbinder/internetexplorer.html
with the following observation:
> In deference to Mike's request, I'll just say that the statement is
> plain wrong.
>
> The page incorrectly reports some sites as invalid, if offers no
> analysis of site errors, what their cause or effect might be, nor does
> it delve below the home page. It is at best superficial and no
> meaningful conclusion can be drawn from it.
I personally lay no claim to be beyond critics, but I would like to be
criticized for the mistakes that I make, and not also for those that I
don't.
This is why I feel like stressing that each page thereby listed and
declared invalid is :
1) correctly (and not "uncorrectly") declared invalid, as long as by
correctness we imply that the page declared invalid is not declared
such by _me_ but by the w3c Validator itself. This is exactly the case,
in all that stunning list of such famous websites, all declared fully
invalid.
2) It can all be proved by merely CLICKING the links (which obviously
has not been done, as it can be evinced by the above mentioned
objection), which do NOT merely link to the site declared invalid, but
to the w3c validator adding to it as a query string the url of the site
delcared invalid. This would reproduce all the causes of the errors, of
course, which therefore are not neglected as you wrongly hint.
I hope you credit me with the impossibility, with hundreds of sites
linked there and declared invalid, to add per each of them also the
excruciating length of all the W3C validator erros that they report,
which in 90% of the cases span throughout the order of the various
hundreds, and this only in order not to be wrongly accused of having
not listed the errors I list letting to the W3C validator the task of
listing as invalid the sites I declare it lists as invalid.
Which are they?
All the following sites are W3C declared invalid:
http://validator.w3.org/check?uri=http://www.nist.gov/ Validate
National Institute Of Standards And Technology
http://validator.w3.org/check?uri=www.cnn.com Validate CNN
http://validator.w3.org/check?uri=www.looksmart.com Validate LookSmart
http://validator.w3.org/check?uri=www.yahoo.com Validate Yahoo
http://validator.w3.org/check?uri=www.google.com Validate Google
http://validator.w3.org/check?uri=www.lycos.com Validate Lycos
http://validator.w3.org/check?uri=www.netscape.com Validate Netscape
http://validator.w3.org/check?uri=www.excite.com Validate Excite
http://validator.w3.org/check?uri=www.altavista.com Validate Altavista
http://validator.w3.org/check?uri=www.tiscali.com Validate Tiscali
http://validator.w3.org/check?uri=www.aol.com Validate AOL
http://validator.w3.org/check?uri=http://www.vatican.va/phome_en.htm
Validate Vatican (Holy See)
http://validator.w3.org/check?uri=www.buddhanet.net/ Validate BuddhaNet
http://validator.w3.org/check?uri=http://philanthropy.com/ Validate
Philanthropy com
http://validator.w3.org/check?uri=http://www.nologo.org/newsite/home.php
Validate NoLogo org
http://validator.w3.org/check?uri=www.fao.org/ Validate Food and
Agriculture Organization of the United Nations
http://validator.w3.org/check?uri=www.uspacifistparty.org/ Validate Usa
Pacifist Party
http://validator.w3.org/check?uri=www.gop.com/ Validate Usa Republican
Party
http://validator.w3.org/check?uri=http://www.democrats.org/ Validate
Usa Democratic Party
http://validator.w3.org/check?uri=http://www.gp.org/ Validate Usa Green
Party
http://validator.w3.org/check?uri=http://www.wsws.org/ Validate World
Socialist Party
http://validator.w3.org/check?uri=www.wrox.com Validate Wrox publisher
http://validator.w3.org/check?uri=www.samspublishing.com Validate Sams
publisher
http://validator.w3.org/check?uri=www.mcgraw-hill.com Validate
McGraw-Hill publisher
http://validator.w3.org/check?uri=www.sybex.com Validate Sybex
publisher
http://validator.w3.org/check?uri=www.ziffdavis.com Validate ZiffDavis
publisher
http://validator.w3.org/check?uri=www.doverpublications.com Validate
Dover publisher
http://validator.w3.org/check?uri=www.apache.org Validate Apache
http://validator.w3.org/check?uri=http://www.allexperts.com Validate
AllExperts com
http://validator.w3.org/check?uri=http://answerpoint.ask.com Validate
Ask Jeeves
http://validator.w3.org/check?uri=http://www.nonags.com Validate Nonags
http://validator.w3.org/check?uri=http://www.tucows.com Validate Tucows
http://validator.w3.org/check?uri=http://www.pgpi.org/ Validate Pretty
Good Privacy org
http://validator.w3.org/check?uri=http://www.usr.com Validate Robotics
http://validator.w3.org/check?uri=http://www.intel.com Validate Intel
http://validator.w3.org/check?uri=http://www.logitech.com Validate
Logitech
http://validator.w3.org/check?uri=http://www.epson.com Validate Epson
http://validator.w3.org/check?uri=http://www.canon.com Validate Canon
http://validator.w3.org/check?uri=http://www.nikon.com Validate Nikon
http://validator.w3.org/check?uri=http://www.xml.com Validate XML com
http://validator.w3.org/check?uri=http://www.xml.org Validate XML org
http://validator.w3.org/check?uri=http://friendfinder.com Validate
Friend Finder
http://validator.w3.org/check?uri=http://www.mirc.com Validate Mirc com
http://validator.w3.org/check?uri=http://www.winzip.com Validate Winzip
http://validator.w3.org/check?uri=http://www.html.it Validate Html.it
http://validator.w3.org/check?uri=http://www.irfanview.com Validate
Irfan View
http://validator.w3.org/check?uri=http://www.adobe.com Validate Adobe
http://validator.w3.org/check?uri=http://www.aaas.org/ Validate
American Association for the Advancement of Science
http://validator.w3.org/check?uri=http://www.cancer.org/ Validate
American Cancer Society
http://validator.w3.org/check?uri=http://www.worldwildlife.org/
Validate WWF
http://validator.w3.org/check?uri=http://www.olympic.org/ Validate
Olympic Games org
http://validator.w3.org/check?uri=http://www.activist.ca/ Validate The
Activist Network
http://validator.w3.org/check?uri=http://www-cs.stanford.edu/ Validate
Stanford Computer Science Department
http://validator.w3.org/check?uri=http://www-cs-faculty.stanford.edu/~knuth/
Validate Donald Knuth's
http://validator.w3.org/check?uri=http://www.greenpeace.org/ Validate
Greenpeace
http://validator.w3.org/check?uri=www.nbc.com Validate NBC
http://validator.w3.org/check?uri=www.abc.com Validate ABC
http://validator.w3.org/check?uri=www.ebay.com Validate Ebay com
http://validator.w3.org/check?uri=www.pcworld.com Validate PC World
http://validator.w3.org/check?uri=www.cnet.com Validate CNET com
http://validator.w3.org/check?uri=www.lockergnome.com/ Validate
Lockergnome
http://validator.w3.org/check?uri=http://news.bbc.co.uk/ Validate BBC
uk
http://validator.w3.org/check?uri=http://www.chinaview.cn/ Validate
China View (Xinhuanet english)
http://validator.w3.org/check?uri=http://news.techwhack.com/ Validate
Tech
Whack India
http://validator.w3.org/check?uri=http://www.webuser.co.uk/ Validate
Web User uk
http://validator.w3.org/check?uri=www.informationweek.com Validate
Information Week
http://validator.w3.org/check?uri=www.macworld.com Validate Mac World
http://validator.w3.org/check?uri=www.linux.org Validate Linux org
http://validator.w3.org/check?uri=www.oracle.com/ Validate Oracle com
http://validator.w3.org/check?uri=www.motorola.com/ Validate Motorola
com
http://validator.w3.org/check?uri=www.softpedia.com/ Validate Softpedia
com
http://validator.w3.org/check?uri=www.betanews.com/ Validate Beta News
com
http://validator.w3.org/check?uri=http://blogcritics.org/ Validate Blog
Critics org
http://validator.w3.org/check?uri=www.geek.com/ Validate Geek com
http://validator.w3.org/check?uri=www.hp.com Validate Hewlett-Packard
http://validator.w3.org/check?uri=www.disney.go.com Validate Disney com
http://validator.w3.org/check?uri=www.ryanair.com Validate Ryan Air com
http://validator.w3.org/check?uri=www.historychannel.com Validate
History Channel
http://validator.w3.org/check?uri=www.webpronews.com Validate Web Pro
News
http://validator.w3.org/check?uri=www.monster.com Validate Monster com
http://validator.w3.org/check?uri=www.dice.com Validate Dice com
http://validator.w3.org/check?uri=www.blogger.com Validate Blogger com
http://validator.w3.org/check?uri=http://searchsecurity.techtarget.com
Validate
Search Secuirty com
http://validator.w3.org/check?uri=www.nationalgeographic.com Validate
National Geographic
http://validator.w3.org/check?uri=www.icann.org Validate Internet
Corporation For Assigned Names and Numbers
http://validator.w3.org/check?uri=www.nokia.com Validate Nokia
http://validator.w3.org/check?uri=http://www.usa.visa.com/?country=us
Validate Visa
http://validator.w3.org/check?uri=http://www.home.americanexpress.com/home/mt_personal.shtml
Validate American Express
http://validator.w3.org/check?uri=http://www.ain.cubaweb.cu Validate
Cuban Official Agency Of News
http://validator.w3.org/check?uri=/www.korea-dpr.com/ Official Homepage
- Democratic Peoples Republic of Korea
http://validator.w3.org/check?uri=www.symantec.com Validate Symantec
http://validator.w3.org/check?uri=www.redcross.org Validate Red Cross
http://validator.w3.org/check?uri=www.amnesty.org Validate Amnesty
International
http://validator.w3.org/check?uri=www.scientology.org Validate
Scientology
http://validator.w3.org/check?uri=www.un.org Validate United Nations
http://validator.w3.org/check?uri=www.unicef.org Validate United
Nations Children's Fund
http://validator.w3.org/check?uri=www.cia.gov Validate Central
Intelligence Agency
http://validator.w3.org/check?uri=www.fbi.gov Validate FBI
http://validator.w3.org/check?uri=www.eweek.com Validate Eweek
http://validator.w3.org/check?uri=www.match.com Validate Match com
http://validator.w3.org/check?uri=www.britannica.com Validate
Encyclopedia Britannica Online
http://validator.w3.org/check?uri=www.webreference.com Validate
Webreference
http://validator.w3.org/check?uri=www.napster.com Validate Napster
http://validator.w3.org/check?uri=www.foxmovies.com Validate 20th
Century FOX
http://validator.w3.org/check?uri=www.cosmopolitan.com Validate
Cosmopolitan
http://validator.w3.org/check?uri=www.php.net Validate PHP net
http://validator.w3.org/check?uri=www.opensource.org Validate Open
Source org
http://validator.w3.org/check?uri=www.macromedia.com Validate
Macromedia
http://validator.w3.org/check?uri=www.qualcomm.com Validate Qualcomm
http://validator.w3.org/check?uri=www.honda.com Validate Honda com
http://validator.w3.org/check?uri=www.mercedes-benz.de Validate
Mercedes Benz com
http://validator.w3.org/check?uri=www.house.gov Validate Usa Parliament
online
http://validator.w3.org/check?uri=www.assemblee-nationale.fr Validate
French Parliament online
http://validator.w3.org/check?uri=www.bundestag.de Validate German
Parliament online
http://validator.w3.org/check?uri=www.perl.com Validate PERL com
http://validator.w3.org/check?uri=www.python.org Validate Python org
http://validator.w3.org/check?uri=www.webmasterpoint.org Validate
Webmasterpoint org
http://validator.w3.org/check?uri=http://dynamicdrive.com/ Validate
Dynamic Drive
http://validator.w3.org/check?uri=www.penguin.co.uk Validate Penguin
Books
http://validator.w3.org/check?uri=www.shakespeare.com Validate
Shakespeare com
http://validator.w3.org/check?uri=http://web.mit.edu Validate MIT edu
http://validator.w3.org/check?uri=www.stanford.edu Validate
University Of Stanford
http://validator.w3.org/check?uri=www.harvard.edu Validate
University Of Harvard
http://validator.w3.org/check?uri=www.berkeley.edu Validate University
Of Berkeley
http://validator.w3.org/check?uri=www.evolt.org Validate Evolt
http://validator.w3.org/check?uri=www.useit.com Validate Jakob
Nielsen's Useit dot com
http://validator.w3.org/check?uri=www.sciam.com Validate Scientific
American
http://validator.w3.org/check?uri=www.nytimes.com Validate New York
Times
http://validator.w3.org/check?uri=www.reuters.com Validate Reuters
http://validator.w3.org/check?uri=www.guardian.co.uk Validate Guardian
co uk
http://validator.w3.org/check?uri=www.forbes.com Validate Forbes
http://validator.w3.org/check?uri=www.arabnews.com Validate Arab News
http://validator.w3.org/check?uri=www.telegraph.co.uk Validate
Telegraph UK
http://validator.w3.org/check?uri=www.businessweek.com Validate
BusinessWeek
http://validator.w3.org/check?uri=www.britishairways.com Validate
British Airways
http://validator.w3.org/check?uri=www.lufthansa.com Validate Lufthansa
Airways
http://validator.w3.org/check?uri=www.ti.com Validate Texas Instruments
http://validator.w3.org/check?uri=www.amazon.com Validate Amazon
http://validator.w3.org/check?uri=www.apple.com Validate Apple
http://validator.w3.org/check?uri=www.playboy.com Validate Playboy
http://validator.w3.org/check?uri=www.lemonde.fr Validate Le Monde
france
http://validator.w3.org/check?uri=www.lefigaro.fr Validate Le Figaro
france
http://validator.w3.org/check?uri=www.spiegel.de Validate Der Spiegel
germany
http://validator.w3.org/check?uri=www.repubblica.it Validate La
Repubblica italy
http://validator.w3.org/check?uri=www.iht.com Validate Herald Tribune
International
http://validator.w3.org/check?uri=www.thetimes.co.uk Validate The Times
http://validator.w3.org/check?uri=www.newsweek.com Validate Newsweek
http://validator.w3.org/check?uri=www.time.com Validate Time
http://validator.w3.org/check?uri=www.samsung.com Validate Samsung
http://validator.w3.org/check?uri=www.mozref.com/reference/objects/Selection
Validate A Random Mozilla Documentation
http://validator.w3.org/check?uri=www.sun.com Validate Sun Microsystem
- 3
- problems with firefox, frames, and targeted linksI built my portfolio with Dreamweaver MX. In the bottom frame, I have
thumbnails of images. When you click on a thumbnail, it is supposed to
load the full size image in a targeted part of the top frame. It
works fine in Explorer and Safari, but not in Firefox.
The address is http://www.justmyname.com/portfolio
If anyone has any suggestions on why it isn't working, I'd appreciate
some help.
Thank you,
John
- 6
- Implementing web analytics tagsI'm implementing my own primitive web analytics package. I'd like to add
javascript tags to pages so I can track usage. Most of the packages out
there ask you to include something like this in your pages:
<script
src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
</script>
<script
type="text/javascript">
_uacct = "my_account_num"; urchinTracker();
</script>
(This is an example from Google Analytics)
I can't make heads or tails of the javascript in urchin.js, though. Does
anyone know what it is doing, exactly?
My guess is that it is capturing the URL of the page, and then issuing a
fetch to another page that passes that URL on, but I'm not sure how to
do that in Javascript.
- 7
- How to stop a validation function from executing after it encounters an error?I wrote a very simple validation fucntion to check if all fields are
entered properly in a dialog box before returning this the values to
the parent form. The validation works finr however, I am not sure if I
am doing this correctly. For example if the telephone number field is
empty, the alert box appear telling the users to enter the telephone
number. However, once I click OK. the script appear to run and I get an
error message in the "dialog box window". What I would like to do is
let the user click ok and return back to the problem field. Below is my
code.
var thisdoc=document.forms[0]
var Role=getSelectedText(thisdoc.Role)
var MemberLookup=thisdoc.MemberLookup.value
if(Role==">>>Select Role") {
alert("Please select a role for this Team member")
thisdoc.Role.focus();
return
}
if (Role.substring(0,2)=="01" && thisdoc.TeamLeadAppt.value=="Y"){
alert("You can appoint only one person as Team Leader")
}
var ContactNo=thisdoc.ContactNumber.value
if(ContactNo.value==" ") {
alert("Please enter a Contact Number Team member")
thisdoc.ContactNumber.focus();
return;
}
if(ContactNo.length!=8) {
alert("Please enter a valid 8 digit telephone number this Team
member")
thisdoc.Role.focus();
return;
}
if(ContactNo.length!=8) {
alert("Please enter a valid 8 digit telephone number this Team
member")
thisdoc.Role.focus();
return;
}
window.opener.teamSelectionCallback(MemberLookup,Role,ContactNo)
window.close()
- 10
- JavaScript form referencing issue (again)Hi chaps, one of those perennial questions.
I want to make a submit button (input type=image) roll over.
Referencing it is a pain.
The context: a complex navigation bar with a series of nav buttons and
a CGI search field plus submit button. Table construction in the bar
means that the neatest way to build the thing is to put a form wrapper
around the entire table.
Rolling over an image is trivial: document.images[imageName].src =
etc...
However, the submit image isn't having any. I've tried various
referencing tricks (document.formName.elements[imageName] etc) to no
avail. Questions:
*Can* I manipulate the SRC attribute of an image submit button?
If so, how do I reference it reliably for all browsers?
Best, Will
PS Have already considered and rejected onClick=Submit(): I need it to
be an input button not an anchored image. Sorry
- 11
- How to pass image file name (SRC) to a function that creates a Web page?Hi,
I'd like to know if it's possible to pass an image name (the IMG SRC
attribute) from HREF element to a function that is activated by onClick
event and creates a Web page.
I have this HREF element:
<A HREF onClick="showLargePicture()"><IMG HEIGHT=25 SRC="test01.jpg"></A>
When an user clicks on the picture, the following code is performed:
function showLargePicture() {
var lines="";
lines+="<HTML><HEAD>";
lines+="<TITLE>Any Title</TITLE>";
lines+="</HEAD>";
lines+="<BODY onClick = 'window.close()'>";
lines+="<IMG SRC='test01.jpg'>";
lines+="<BR>";
lines+="Click on the window to closes it";
lines+="</BODY></HTML>";
var newWin=window.open();
newWin.document.open();
newWin.document.write(lines);
newWin.document.close();
newWin.focus();
}
Is it possible to modify the code so it'll pass the SRC attribute to the
function and thus to use it with any picture on the parent Web page?
Thanks!
- 11
- fetch in firefoxIs there a way to open a URL invisibly, then get the source code of the
page? I would like to put the source code of a URL into a variable without
actually opening the URL in a browser.
thanks in advance!
- 11
- extend alt/title time?Is there a way to extend the time an alt or title window appears in
IE? Or is there a way to use css to control that element and it's
appearance?
Thanks,
Steve.
- 11
- Numeric field validation fails for single characterI am using following function to check for my input
my input is like 0.00 i dont want to allow any specialcharacters.
function numericValidation() {
var x = this;
var reg = new RegExp('^[0-9]*\.?[0-9]*$');
if (reg.test(x)) {
return true;
}
else return false;
}
here problem is when i type one character other than this range Regular
expression doesnt work i mean it gives true for input '@' if i type
'@@'then it gives false
actually it shd gv false for both the case.
- 16
- Hide address barHow can I hide the browser address bar onload...not from a javascript
hyperlink from another page...
thanks
Jim
- 16
- Failuer In Accessing A Web Service From JavaScriptHi All,
I am trying to access a web service from Internet Explorer6.0 That has
been deployed using Apache Axis-1.2. The code to access the web
service is pasted as Below:
<HTML>
<HEAD>
<TITLE>Web Service Test</TITLE>
<SCRIPT LANGUAGE="JavaScript">
var iCallerID = 0;
function init()
{
alert("Calling Service");
//Establsih the friendly name for the service
service.useService("http://192.168.0.13:8080/axis/HelloServer.jws","myService");
alert("Servcie 192");
var str = new String("Anshu");
iCallerID = service.myService.callService("sayHelloTo", "rohit");
alert("Calling One" + iCallerID);
}
function onWSresult()
{
// if there is an error, and the call came from the call() in init()
if((event.result.error)&&(iCallerID==event.result.id))
{
alert("Error Generated = " + event);
// Pull the error information from the event.result.errorDetail
properties
var xfaultcode = event.result.errorDetail.code;
var xfaultstring = event.result.errorDetail.string;
var xfaultsoap = event.result.errorDetail.raw;
alert("The error string is " + event.result.errorDetail.string);
alert("Fault soap " + xfaultsoap);
alert("The server said " + event.result.value);
// Code to handle the specific errors can be placed here
}
// if there was no error, and the call came from the call() in
init()
else if((!event.result.error) && (iCallerID == event.result.id))
{
// Show the Results
alert("The server said " + event.result.value);
}
else
{
alert("Something else fired the event!");
}
}
</SCRIPT>
</HEAD>
<BODY onLoad = "init()">
<DIV id = "service" style = "behavior:url(webservice.htc)"
onresult="onWSresult()">
</DIV>
</BODY>
</HTML>
This client script tries to access a Web Service, The java class is
named HelloServer and the method which Iam trying to call is named as
sayHelloTo, (this method accepts a string and returns a string).
When I load this page the error shown on the page is SOAPNull error.
Can anybody help me with this?
Also guide me if there is any other mehtod of Accessing the WebService
deployed on Tomact+AXIS using InterNetExplorer.
Thanks & regards,
Rohit Ganda
|
| Author |
Message |
David

|
Posted: 2004-5-14 19:42:16 |
Top |
javascript, image redirect question
Hi,
I notice that one image appears to be high on the entry pages for my site
weblogs. My guess is that all these visitors ever see of the site is the
image.
IS it possible to redirect these visitors to a different page that will have
the original content they clicked for, plus a link to the rest of the site
instead of just viewing the .jpg?
Thanks
|
| |
|
| |
 |
Erwin Moller

|
Posted: 2004-5-14 20:48:00 |
Top |
javascript >> image redirect question
David wrote:
> Hi,
>
> I notice that one image appears to be high on the entry pages for my site
> weblogs. My guess is that all these visitors ever see of the site is the
> image.
>
> IS it possible to redirect these visitors to a different page that will
> have the original content they clicked for, plus a link to the rest of the
> site instead of just viewing the .jpg?
>
> Thanks
Hi,
If the people are just linking to the image like this:
<img src="http://www.yourwebsite.com/images/veryspecial.jpg">
then you cannot do a lot, except maybe replace that veryspecial.jpg by a new
picture with your text on it, saying where they can see the real image. :-)
Regards,
Erwin Moller
|
| |
|
| |
 |
Randy Webb

|
Posted: 2004-5-14 21:30:00 |
Top |
javascript >> image redirect question
David wrote:
> Hi,
>
> I notice that one image appears to be high on the entry pages for my site
> weblogs. My guess is that all these visitors ever see of the site is the
> image.
>
> IS it possible to redirect these visitors to a different page that will have
> the original content they clicked for, plus a link to the rest of the site
> instead of just viewing the .jpg?
Are you making that "guess" based on your logs or on the visible
appearance of your page? If its from your logs, then they are viewing it
directly and not a lot you can do. If its from the visible appearance of
your page (you have a large image at the top of your page that forces
them to scroll to see the content), then redesign your page.
Nothing to do with javascript.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
|
| |
|
| |
 |
David

|
Posted: 2004-5-14 21:50:00 |
Top |
javascript >> image redirect question
Thanks for the replies. I did expect to find that it wasn't possible, but
it never hurts to ask :)
> Are you making that "guess" based on your logs or on the visible
> appearance of your page? If its from your logs, then they are viewing it
> directly and not a lot you can do.
Yes. The software I use for analysing the logs allows me to replicate the
visitor's search etc, and all they see is the image in the browser.
Thanks
David
|
| |
|
| |
 |
| |
 |
Index ‹ javascript |
- Next
- 1
- 2
- Making a scrollable table headerhiii
i have a problem where i need to create a dynamic page which displays
some data in a tabular from fetched from the DB. The table has some 10
columns and 30 rows.. to fit the data on the screen i have made the
table scrollable in the following way:
create a Div with style="overflow:scroll";
also i am having a class for header with "position:relative"
and another class for the table date with "OVERFLOW:auto"
now the problem is that the header is static and stays on top when i
move the scrollbar top to bottom. but its not scrollable from left to
right also!!!!....if the scroll bar has to be moved from left to
right.....so the header is not scrollable......any leads please???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------
CODE---------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<!doctype html public "-//w3c//dtd html 4.01//en" "http://
www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
.table-header{position:relative;top:-1px;
background-color:white;overflow:inherit}
.table-body{OVERFLOW:auto;HEIGHT:115px;WIDTH:400px;
position:absolute}
.grid-div{OVERFLOW:scroll;HEIGHT:130px;WIDTH:400px}
</style>
<script language="javascript" >
window.onload = function(){
if (document.all){
//REMOVE TBODY STYLE FOR IE
var gridBody =
document.getElementById("GridBody");
gridBody.className = '';
} else {
//REMOVE DIV STYLE FOR NON-IE
var gridDiv =
document.getElementById("GridContainer");
gridDiv.className = '';
}
}
</script>
</head>
<body>
<form id="Form1">
<div id="GridContainer" class="grid-div">
<table id="Grid" width="400px" border="1">
<tr class="table-header">
<!--create column headers -->
<th>
col</th>
<th>
col</th>
<th>
col</th>
<th>
col</th>
</tr>
<tbody id="GridBody" class="table-body">
<tr> <!--create rows/columns of data-->
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
</tr>
<tr> <!--create rows/columns of data-->
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
</tr>
<tr> <!--create rows/columns of data-->
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
</tr>
<tr> <!--create rows/columns of data-->
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
</tr><tr> <!--create rows/columns of data-->
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
</tr><tr> <!--create rows/columns of data-->
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
</tr><tr> <!--create rows/columns of data-->
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
</tr><tr> <!--create rows/columns of data-->
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
<td height="20px">col</td>
</tr>
<!--COPY ROWS UNTIL YOU SEE A SCOLLBAR IN YOUR BROWSER-->
</tbody>
</table>
</div>
</form>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 3
- Please tell me the generic way to check different radio button groups?I want to check each button groups and save the checked value into a 2
dimensional array. But, it doesn't work. Could anyone tell me what's
wrong with my code. My code is as follow:
<html>
<body>
<script language="javascript">
<!--
var temp = new Array(2)
var status = new Array();
function getRadios( paramform )
{
for( var iElement=0; iElement<paramform.elements.length; iElement++ )
{
if( paramform.elements[iElement].checked )
{
temp[0] = paramform.elements[iElement].name;
temp[1] = paramform.elements[iElement].value;
status[status.length] = temp;
}
}
}
<form name="training">
<table>
<tr>
<td>Microsoft Outlook: </td>
<td>
<input type='radio' name="outlook" value="START"
onClick="getRadios(document.training)"> START
<input type='radio' name="outlook" value="COMPLETED"
onClick="getRadios(document.training)"> COMPLETED
<input type='radio' name="outlook" value="IN PROGRESS"
onClick="getRadios(document.training)"> INPROGRESS
</td>
</tr>
<tr>
<td>Microsoft Word: </td>
<td>
<input type='radio' name="word" value="START"
onClick="getRadios(document.training)"> START
<input type='radio' name="word" value="COMPLETED"
onClick="getRadios(document.training)"> COMPLETED
<input type='radio' name="word" value="IN PROGRESS"
onClick="getRadios(document.training)"> INPROGRESS
</td>
</tr>
</table>
</form>
</body>
</html>
- 4
- getYear() returns correct year local, but wrong year onlineHello,
I have made a first version of the frontpage of my new homepage. I use
the small javascript
<script type="text/javascript">
var modDate = new Date(document.lastModified);
var day = modDate.getDate();
var month = modDate.getMonth()+1;
var year = modDate.getYear();
var s = "Deze pagina werd laatst aangepast op ";
s += ((day < 10)?"0"+day:day) + "/";
s += ((month < 10)?"0"+month:month) + "/";
s += year;
s += ".";
document.writeln(s);
</script>
to print the date on which the page was last modified. When I look at
the page when it resides on my hard disk, then the date is correct:
19/08/2003. But when I put that same page online at the webspace
assigned to me by my internet provider, then the date turns into
19/08/2036. So the year is completely wrong!
I use Internet Explorer 6.0. The url of the online page is
http://home.scarlet.be/~vv991306/temp_homepage/
Any idea what I'm doing wrong here? Or is the date on the server set
wrong and is that what's causing my problem?
Thanks,
Veerle
- 5
- checking existence of an element?Is it possible to check for the existence of an element? I have a dynamic
page which may or may not have a <div> holding a bunch of thumbnails, and I
want a function to check for the existence of the <div>. Doing:
blah = getElementById("thumbnails");
Generates an error.... I was hoping it would just return false or
something... Is there a way of doing this?
P.
- 6
- Writing event handler in HTML tag vs. via scriptingIf I have
<td onMouseOver="foo(event,this,'string');">something</td>
It works fine i.e. the event handler function foo is fired with the
event parameter containing the event. I do the cross-browser thing to
handle the event parameter
var evt = (evt) ? evt : ((window.event) ? event : null);
and I am all set
But when I try to do the same thing by scripting i.e. get the TD node
via the DOM and add in the event handler like so
var td=document.getElementById('tdid')
td.onmouseover=function() {
foo(event,this,"string");
|
It works in IE, but in Firefox (1.x), I get an error in the JS console
"event is not defined".
Why is this? Any way to get consistent, cross-browser behaviour?
Thanks
- 7
- Javascript error :(( ??????Evertjan?
"Evertjan." <email***@***.com> wrote in message
news:email***@***.com...
> Louis wrote on 10 aug 2003 in comp.lang.javascript:
>
> > window.open(url,'image',config='width=1,height=1,top=100,left=100,resiz
> > able= yes');
> >
>
> window.open(url,'image','width=1,height=1,top=100,left=100,resizable=
> yes');
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
- 8
- Help with loop/naming elements<disclaimer>New to js.</disclaimer>
I have several pages, each with menues comprising checkboxes or radio
boxes within the same form. I presently 'brute force' clear the buttons
with individual scripts for each form, e.g.:
function clearLa() {
window.document.form1.button1La.checked=false;
window.document.form1.button2La.checked=false;
window.document.form1.button3La.checked=false;
window.document.form1.button4La.checked=false;
window.document.form1.button5La.checked=false;
}
Another set of buttons in the same form might be call, e.g., button1Ra et
seq.
I tried to simplify the above with a simple loop:
var counter = 1;
function clearLa() {
while (counter < 6) {
window.document.form1.button[counter]La.checked=false;
counter++;
}
}
But it seems to go into an infinite loop. Where am I going wrong?
I would ultimately like to have a single generic routine that I can pass
the number of buttons in the menu as well as the name of the button set
(e.g., buttonLa, buttonXz, etc. So, for a set of 8 buttons called
buttons1xy, button2xy...button8xy, I can write something like
'onClick = "clearButtons(xy,8).' How do I do it?
--
Ed Jay (remove M to respond by email)
- 9
- close window eventI have a popup and I would like to capture the close window event.
How can I do that in javascript?
Daniele
- 10
- Advanced JavascriptHello Experts!
I have been programming for about 5 years now(mainly using asp.net
C#), and I am ready to expand my skill set and add some advanced
javascript and ajax skills under my belt. Javascript and Ajax are not
unfamiliar to me, but I would like to find a good source that will
teach me how to do some enterprise level advanced programming. I was
thinking about downloading the The Yahoo! User Interface Library
(YUI), and just looking at their source code, but perhaps you experts
know of a better approach to learn? Also, if you all know of some good
books, please let me know.
Thanks for the info.
- 11
- mouse drag table borders + coordinates outputHow hard would it be to rig borders inside a table so they could be
dragged to different positions? I have already come accross a script
like that, but it had problems if the table had a set width, the
borders don't stay where you dragged them. If the width was dynamic,
they do. But the width of the table has to be dynamic because the
picture in the background has to display whole.
http://icebone.dyndns.org/test.html
And apparently i've also lost IE functionality while stripping this:
http://www.devsoftware.com/dhtmlTest/tableIE.html
- 12
- Finding out position of html elements?Is there a possibility to find out the coordinates, relative to the whole
screen, or
at least relative to the browsewindow, where an element ( e.g. link or
picture )
begins or ends?
Thx
A.Gallus
- 13
- 14
- Javascript - Navigator Object Hey all. Got a quick question:
How the navigator object gets the browser name and version ? Is it
from the registry ? Or from a system variable ? Is there any way to
modify it ?
In order to use it on my project I need to find this out...
Thx.
- 15
- how to reload a frame from a popupHi,
I have a problem that seems simple, but do not fid how to solve it.
I have a window with 2 frames (A et B). When I click on a link in A, I open
a window. In that window, I have a form and when it's submited, I must come
back to this popup to display things, but I would also like to reload frame
A. How can I do that ? How can I access this frame ?
Thanks
Fred
|
|
|