473,700 Members | 2,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

document.locati on.href not working!?!?!?!

can someone PLEASEEEEEEEEEE tell me why this isn't working???

-------------------- function ------------------------

function goBlank(){

newlocation = "blank.asp" ;
top.window.docu ment.location.h ref=newlocation ;
return true;
}

-------------------------- html ------------------

<td><div align="center" ><a href="javascrip t:;" ><span
class="popupBut ton" style="text-decoration: none; line-height: 24px;"
onClick="checki n();" >&nbsp;&nbsp;&n bsp;Check In
&nbsp;&nbsp;&nb sp;</span></a></div></td>

I have tried every conceivable combination and it just wont work.. I
can see the status bar flash, like its loading a new page, but the page
doesnt change..

thanks in advance...

Jul 23 '05 #1
3 23297
Lee
Brian said:

can someone PLEASEEEEEEEEEE tell me why this isn't working???

-------------------- function ------------------------

function goBlank(){

newlocation = "blank.asp" ;
top.window.doc ument.location. href=newlocatio n ;
return true;
}

-------------------------- html ------------------

<td><div align="center" ><a href="javascrip t:;" ><span
class="popupBu tton" style="text-decoration: none; line-height: 24px;"
onClick="check in();" >&nbsp;&nbsp;&n bsp;Check In
&nbsp;&nbsp;&n bsp;</span></a></div></td>

I have tried every conceivable combination and it just wont work.. I
can see the status bar flash, like its loading a new page, but the page
doesnt change..


You haven't showed a function named checkin().
You seem to be abusing an <a> tag just to get the pointer icon.
I tend not to trust relative pathnames.

Jul 23 '05 #2
sorry.. that was the wrong link.... here is the correct one...
----------------------------------------------------------------------------------

<div align="right">< span class="popupBut ton" style="text-decoration:
none; line-height: 24px;" onClick="goBlan k();" >Close
Window</span></div>
-----------------------------------------------------------------------------------------------------------
I dont know why i have the <a> tag there.. I'm using CSS to create the
hand. i just removed it.. I did try absolute paths as well.. I also
tried, "document.locat ion.href" and "window.locatio n.href" and
"self.location. href".. I tried putting it directly in the <span tag and
creating this function... i just dont get it..

Jul 23 '05 #3
LOL.. Thank you.. you just helped me answer it.. I took the <a> tag out
and it worked.. that is weird.. I remember I had tried putting the
onClick event in the <a> tag and it didnt work.. I guess i just kept
the <a> tag there.. thanks for your help..

Jul 23 '05 #4

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

Similar topics

4
8550
by: Robert Oschler | last post by:
I have a comparison web page that has several iframes that contain documents from external domain web sites. Some of the web sites are "trusted". If they want to change the top level document location (document.location.href) via Javascript or using "_TOP" as the target for a SUBMIT operation, etc., then I want to allow it. The other web sites I want to block if they try to do that. I would do the blocking in the top level document...
1
1356
by: kurt | last post by:
greetings, I'm working on a bookmarklet that needs to overwrite the current document with a frameset where the src of one of the frames is the current URL. What I've come up with works in Mozilla (Firefox 1.0pr). But in IE6, though View Source shows that the new frameset is there with the correct URL inserted, nothing displays. It's a white page. Anyone see the problem/solution? code:
8
8236
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) { document.location.href = document.location.href.substring(0, document.location.href.indexOf('#')) + '?' + newUrl; } else { document.location.href = document.location.href + '?' + newUrl; }
2
2203
by: Muffinman | last post by:
Hi, I want to split the result from window.frames.document.location;, this in order to find out which page is currently opened in the specific frame. When I do it like this: var source = window.frames.document.location; // var source = "W3Schools is great!"; index_source = source.split('/');
3
3597
by: Paul Thompson | last post by:
I am working with a special tool which pre-processes the page. Using document.write, I am composing the page while it is loading, so I need to force a reprocess of the page AFTER the page loads. Is there some way to do that? That is, I want the browser to essentially act as if the composed page was the original page. Here is a brief version of the page construction technique:
2
41498
by: yogesh.bhardwaj | last post by:
Hello all I am trying to modify the link URL when a user clicks on the link. Following is the code: <a onClick="document.location.href=modifyURL(this.href);" href="SOME_DYNAMIC_URL" %>Link</a> The javascript function, modifyURL(href), works fine and returns the desired URL, but for some reason, the value of 'href' is not getting
9
36728
by: alu | last post by:
Could someone explain the discrepancies within and between the stated definitions / usage of 'document.location' , 'document.URL' vs. their actual functionality? Should they be read-only when in fact they are not? Is 'document.URL' also deprecated, and should therefore never be used? What is the last word re: the proper syntax for returning and setting the current window's location? We have: document.location document.location.href
1
2177
by: captainwin | last post by:
Here's the problem: - Website is ASP.NET 1.0 - Server is Windows Server 2003 - Browser is IE 6/7 - Client requests a mail merged MS Word 97 - 2003 document on the website, and the document gets created on the server. - Need to send the document to the client browser and delete the file from the server. Previously, the web application already did this, but after some hardware and location changes, the application no longer performs this...
0
8649
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9219
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9081
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8931
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6564
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5904
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4408
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2032
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.