Passing/using Document Location

Aug 5, 2009

Im currently creating a Table with 2 frames (table in top, last row clicked in bottom)

<html>
<frameset rows = "60%, 40%">
<frame src = "table_driver.php" name = "A" id = "FRAME1">
<frame src = "bottom_row.php" name = "B" id = "FRAME2">
</frameset>
</html>

In bottom_row.php I have one object, a [obj = new TableData()]. onClick of a row in FRAME1, obj is initialized to what was clicked and the row is changed.

anyways currently I have it working but want it such that it can work with multiple frames, with a location parameter.

this is currently what I have

function TableData(headers, row, loc)
{
this.headerArr = headers;
this.rowArr = row;

[Code]....

View 2 Replies


ADVERTISEMENT

Document.location.href Or Document.URL

Dec 18, 2002

Which is the better option to use when dynamically loading a page?

document.location.href = "newpage.html"

or

document.URL = "newpage.html"

My book says that Netscape depreciated document.location.href in favour of document.URL, but yahoo are using document.location.href. Also, is there a good online reference (up-to-date) of the DOM which includes stuff like this?

View 6 Replies View Related

Document.location

Jun 28, 2002

or is it window.location?

anyway, why doesn't this work?

Any ideas why this doesn't work?

<script language="javascript">

function goclaims()
{
document.location.replace = "../webapplication2/webform1.aspx";
}
</script>

<asp:ImageButton onlick="goclaims();" id="Image5" onmouseover="this.className='applyBorder'" onmouseout="this.className='removeBorder'" runat="server" Width="24px" Height="18px" ImageUrl="file:///C:Documents and SettingsgregbDesktopiconsClaims.ico" CssClass="removeBorder"></asp:ImageButton>

View 3 Replies View Related

Passing A Variable To Window.location.replace?

Aug 14, 2010

this is a newbie question, and probably really dumb, but If I create a function that looks like this...

function recall(tim)
{
setTimeout("window.location.replace('somepage.html')",tim);
}

it works fine when called. However; I want to be able to pass the page url in a variable, something like this.

[Code]...

View 3 Replies View Related

Document Location During Runtime

Aug 19, 2003

I'd like to find the document location during runtime for a script I'm using, and having next to no experience with JavaScript, I don't know how.

For example, if my document is local:
http://localhost/websites/example/script.js

If my site is live:
http://www.example.com/script.js

How can I extract everything but the script name and put it in a variable?

View 2 Replies View Related

Document.location Not Working?

Feb 18, 2010

I have been trying to get the code below working for 9 hours now. Finally, I decided to test the same code on another sever, and it works fine! I have no idea why the same code would work on one server, but not another.

The code is self-explanatory, I created a button that when clicked will navigate the user to a link (#hit1).

Code:
<script type="text/javascript" language="javascript">
function firstHit(){
document.location="#hit1";

[Code]....

View 3 Replies View Related

View-source:'+document.location'

Jul 20, 2005

This will give me the source of the current page.

<a herf="javascript:document.location = 'view-source:'+document.location">testpage.htm</a>

I want to display the source of another page, using something like this but it doesn't work:

<a herf="javascript:document.location = 'view-source:'+'testpage.htm'>testpage.htm</a>

?? Won't work, unless it is saved on a server with http:// in front of it.

View 5 Replies View Related

Accesskey & Document.location.href

Dec 7, 2006

Is there any way to get 'accesskey' to work with document.location.href?

I'm using a set of functions as link generators and this is what I'm "stuck with" using.

View 3 Replies View Related

Enter Key Won't Send To Document.location?

Mar 28, 2011

The code below will enter the function when enter key is pressed, and will activate the alerts but will not send to the new page using document.location

the onclick calls the function and sends to the new page?

<script language="javascript">
var ZIPS ="07071";
var ZIPS2 ="07960";
var zipArray = ZIPS.split("/");

[Code]....

View 8 Replies View Related

Document.domain Or Window.location.host ?

Mar 3, 2009

I need to get the domain of the page (mydomain.com) There seems to be 2 variables to get this info. document.domain & window.location.host - Both are set in FF & IE. So whats the difference between these ?

View 1 Replies View Related

Document.write Writing To A Specific Division Or Location

Jul 23, 2005

In searching answers to my quest, I have been looking for a method using
document.write to display the thumbnails in one division while showing text
about the thumbs in another division.

All I've seen so far is that document.write('does this') and that's it.
Nobody expands on this and explains what else you can do with it.
It's like they're more interested in showing you the ads than the
information you need.

View 2 Replies View Related

Document.location.reload(false) Fails To Go To #anchor

Aug 5, 2011

Code:
<a name="loc"></a>
<a href="#loc" onClick="document.location.href='#loc'
document.location.reload(false);return false">Click here to go to your location</a>

When you click onto the link you should go to the page location marked by the anchor tag "loc", however, upon clicking you go to the top of the page and never redirected to the exact spot where your anchor tag is located. Why is that? I'm using IE6 (per requirement) as my platform.

View 9 Replies View Related

JQuery :: Using Document.location.href To Direct To A Non-existant Page

Oct 14, 2011

I'm trying to create a player stats page, for my gaming server. I spoke to a guy who knows a little about javascript, and he told me there's a way to use document.location.href to direct to a custom page URL.

For example, if I search for a name, and the results are displayed. I want to click the players username, and be directed to. [url] without the "username.html" actually existing.

I heard it's possible, and it would save me a lot of time because I don't want to have 20,000+ individual pages, one for each username.

View 1 Replies View Related

Changing Document.location.hash In IE7 Overrides Event.stop(e) And Submits Form

Jul 7, 2009

I am writing a modification to Invision Power Board that makes replying to post via Ajax.

The "Submit" button is being overrun by Prototype's observe function. When the custom function is executed, I run Event.stop(e) to prevent the actual form from being submitted and reload the page.

I have developed and tested on Safari but users began to report bugs in IE, after investigation I discovered that the line

Code:

Is making IE execute all the code after it, and then execute its own onclick() function as if Event.stop(e) was not there. Commenting this line fixes the problem, the page is not reloaded, but this line is vital to the code.

So why do I need to set the anchor? To support the back button function after a user makes an ajax reply, pressing Back should hide the new content, and pressing Forward should make it visible. (e.g. every time the anchor is changed) This all works nicely. But not in IE.

This only happens the first time the page is visited ever, or clearing cache and visiting it again. Reloading the page fixes the problem but this is not normal behavior and users shouldn't have to reload to use the Ajax fast reply...

View 4 Replies View Related

Passing Document As An Argument?

Apr 26, 2010

Quite often, I define variables like so:

Code:
var something = (function () {
if (x) {

[code]....

View 1 Replies View Related

JQuery :: Passing Document Context When Creating An Element?

Dec 29, 2010

Is there any way to pass the document context when doing a create element? If I have an iframe defined as follows..

var f = window.frames.myIframe;
How can I do this in jquery?
var d = f.document.createElement("div");

[code]....

View 1 Replies View Related

Passing A Variable Within A Document.ready Function Into Inline Modal Window?

Apr 27, 2011

i'm using a jQuery Inline Modal Window. the code for it can be found here

[URL]

i currently have an array within a function in javascript. when i click on the appropriate link for the inline modal, the inline modal window appears.

my function looks something like this

function match_all_groups(){
var pop_up_status;
var match_groups = new Array();
var match_groups_count = 0;

[Code]....

i want to receive values from match_groups and display them in my inline modal window. do u know how this can be done?

View 2 Replies View Related

"no Such Interface Supported" When Using Parent.frame.document.location.href

Jul 23, 2005

I have some code that changes a PDF file in another frame using:

parent.frame.document.location.href = "PDF File"

This code works fine the first time it is called. But if a PDF file is
in that frame and the code is called again IE gives me an error:

"no such interface supported"

I have used this code for the past 5 years and it has worked fine with
Adobe Acrobat 4-6 it is only 7 that started to cause me grief. It is
only IE that has this problem, Netscape seems to work fine.

I have checked the web and talked to Adobe and have yet to find a
solution.

View 2 Replies View Related

Document.location.reload(true) Vs Regular Refresh - Reload The Frame

Nov 17, 2010

Is there a difference between right clicking an iframe and reloading post reponse vs. using javascript to reload the frame? So far, the javascript route hasn't worked for me. [some context] I am writing a little bookmarklet to help me with the online registrations at my school. Here is the setup.

Load up a page on the domain. Remove all body elements. Insert an iframe. Set iframe to page for class roster search. (in iframe on school search page) Select class search options, POST the form data, and view results in frame. *This works perfectly, but I need to have it refresh results every minute or so. When I use frame.contentDocument.location.reload(true); the frame loses the post data or something and the page is broken. BUT when I just right click on the frame and select "reload frame" it works perfectly. What is the difference between rightclicking the frame and refreshing it like that vs. using javascript to reload the frame?

View 1 Replies View Related

Making Document.write Write Into A Specific Location ?

Mar 24, 2011

I have a client that has ads on her website that really slow down the site. These ads are called by an off site javascript file and I want to use a jQuery(document).ready or similar method to call these files after all of the site content has loaded. But these files contain document.write functions to add more javascript files. Since I want to load the files after everything else has loaded, this in turn makes the page blank and then loads the ad. Is there a way to position where document.write will write to?

View 1 Replies View Related

JQuery :: $.url() Function - Being Utilized For Parsing Out The Window.location Or Window.location.search Parameters

Feb 14, 2010

Danged if I can find the thread, but I swear I saw a $.url() reference in here a day or two ago. It was beingutilized for parsing out the window.location or window.location.search parameters. I made a mental note because that was something I would be needing to do.

Now I can't find it, either because the search isn't finding it or I was dreaming about this function existing.

I rummaged about the API docs and didn't find it there either. Is it something provided by one of the plugins and not a function native to jQuery?

View 3 Replies View Related

Detect ,on Load Of The Html Document, Whether The Body Of The Iframe Document?

Sep 6, 2009

Suppose a HTML document has a iframe. Using javascript,I want to detect ,on load of the html document, whether the body of the iframe document is ready to be displayed.I want to be able to overwrite the the body contents (before it actullay loads) of the iframe.can I do it with jquery? say if ,HTML doc is

Code:
<html><head></head><body><iframe id="ifrmId" src="http://www.google.com" ></iframe></body></html>

View 1 Replies View Related

Function To Save An Html Document As An Microsoft Word Document?

Feb 9, 2010

i want to save my html document as an microsoft word document will

View 14 Replies View Related

Building SVG Document Using DOM Interface Inside HTML Document

Mar 17, 2007

Normally an SVG document is loaded/parsed/interpreted inside an HTML
document using an 'object' (or 'embed') element, although there are
supposedly other ways too. The problem is, the SVG document must be
static this way.

I want to use the DOM interface to build SVG dynamically inside an HTML
document. I am guessing I can build it inside HTML within an 'object' (or
maybe 'iframe'?) element.

My intentions/goals:

In Javascript, I construct an object 'embedSVG' which has properties and
methods for creating valid SVG elements and setting their attributes and
attribute values.

During construction, the SVG document is created with its root element.
During debugging in FF 2.0 (I'll work on an MSIE-compatible format later),
I am using the Mozilla DOM Inspector and comparing nodes when the
'object' element is loading a valid external SVG document, and when I am
appending the child representing the SVG document created by the DOM
functions.

However the child node (#document) does not specify 'svg' as the root
element, but instead 'HTML'. Something is not working.

Here is the relevant code in 'ScriptTest.html' which is the HTML in which
the SVG is supposed to be embedded. Below it is the relevant code for
'svglib.js' which is supposed to contain code for building the SVG
dynamically.

What this code is supposed to do is load the HTML page and execute the
anonymous script, and draw a navy blue-bordered yellow rectangle on a
blank page. This is similar to the example in the SVG 1.1 W3C
Recommendation on page 202 of the 719-page PDF.

I am getting an exception when embedSVG object placeInHTML() method is
called: NS_ERROR_DOM_HIERARCHY_REQUEST_ERR. I find in DOM Inspector in
spite of or after the exception that a document is placed as a child of
the object element, but it is HTML, with a default 'head', 'title',
'body' elements placed.

Where am I blowing it?

View 3 Replies View Related

Javascript Document History - Is It Possible To Know The Previously Viewed Document?

Jul 24, 2001

Determine what the previous page was that the user was viewing, even if the user arrived at my site by through the use of a browser function (history, location bar, refresh, etc.). Is this possible?

I'm not wuite sure how document.history functions - what degree of privacy is given to the user and to what extent can web pages get URLs from the user's history?

View 2 Replies View Related

Document But When Using The Object Onmousemove It Seems To Run The Code Even If The Mouse Is Still Over Then Document

Dec 6, 2010

I am trying to make a function run if the mouse is moved over the document but when using the object onmousemove it seems to run the code even if the mouse is still over then document, how can I make it so if the mouse is over the document but isn't moving then don't run the code but once the mouse moves run the code? This is the code I made to handle the mouse move collections.

[Code]..

But with this code it runs even when the user doesn't move their mouse and the notification box pops up every second as the code seems to think a still mouse is a moving mouse.

I was thinking about having a run once system but that would mean if the mouse moves it runs once and then if the mouse moves again the code will not run as it has already ran before.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved