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

document target question ?

Mel
i Have:

<script language=JavaScript>document.location=http://www.xxx.com</script>

how can i specify "target=_top" in above script ?

thanks
Aug 3 '05 #1
4 15278
how about (not tested but should work)

<script ...>
<form name="dummy" onSubmit="document.l*ocation=http://www.xxx.com"
target="_top"></form>
document.forms["dummy"].submit();
</script>

regards

Alexander

Aug 3 '05 #2
Mel wrote:
i Have:

<script language=JavaScript>document.location=http://www.xxx.com</script>
Language is depreciated, type is required.

String literals in JavaScript must be quoted

DO NOT post porn sites as sample URLs or within any part of a post or
even play code - keep it for alt.binaries or elsewhere. Some of us
work in corporate environments where inadvertently clicking on such
links can lead to disciplinary action (IT administrators in government
sites just /love/ hunting down contractors for whatever they can get
you for).

Do no attempt the 'solution' posted above.

how can i specify "target=_top" in above script ?


<script type="text/javascript">
top.location.href = "http://www.apple.com";
</script>

<URL:http://www.quirksmode.org/js/framebust.html>

--
Rob
Aug 3 '05 #3
I think top.location.href="url_of_the_page" is easier.
the geek

Aug 3 '05 #4
Mel
apologies;

no harm intended. will follow the suggestion
"RobG" <rg***@iinet.net.auau> wrote in message
news:42***********************@per-qv1-newsreader-01.iinet.net.au...
Mel wrote:
i Have:

<script
language=JavaScript>document.location=http://www.xxx.com</script>
Language is depreciated, type is required.

String literals in JavaScript must be quoted

DO NOT post porn sites as sample URLs or within any part of a post or
even play code - keep it for alt.binaries or elsewhere. Some of us
work in corporate environments where inadvertently clicking on such
links can lead to disciplinary action (IT administrators in government
sites just /love/ hunting down contractors for whatever they can get
you for).

Do no attempt the 'solution' posted above.

how can i specify "target=_top" in above script ?


<script type="text/javascript">
top.location.href = "http://www.apple.com";
</script>

<URL:http://www.quirksmode.org/js/framebust.html>

--
Rob

Aug 3 '05 #5

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

Similar topics

2
by: Stanimir Stamenkov | last post by:
I'm trying to find out if it is permissible to include a schema document with absent target namespace to a schema with specified target namespace, and if it is, what are the rules to resolve the...
3
by: Crimefighter | last post by:
I'm not a javascript guy, but the use of this banner rotator script has given me fits. I know a few causes of the problem thus far, one being the layer tags aren't supported under Netscape 7.1...
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
3
by: davidkarlsson74 | last post by:
Error: document.getElementById("folderMenu").cells has no properties File: http://www.volkswagen.se/tillbehor/js/foldermenu.js Rad: 49 The function activates different DIV:s, but doesn't seem to...
6
by: adamrfrench | last post by:
Let it be mentioned that Javascript is not my forte, so the solution to this could very well be a simple one. I am working on an AJAX function where I can pass a URL and the target ID in, and...
0
by: super.raddish | last post by:
Greetings one and all, I have a single source XML file and I am parsing the "records" within it into separate XML files using xsl:result-document. All that works fine. I am using the Saxon...
2
by: mdawg | last post by:
I am attempting to use the XSLT document function to extract the value of an attribute in a secondary XML file. In order to add an image to the generatedHTML Both xml files I am dealing with are...
6
by: mistral | last post by:
what is correct way open a PDF document in new window use hyperlink? I want show images thumbnails linked with PDF files, when click on thumbnail, PDF will be opened in new window. Some of PDF...
23
by: vunet | last post by:
It is recommended by some sources I found to create IFrames in IE using document.createElement('<iframe src="#">') instead of document.createElement('iframe'). Why and what browser versions to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.