How To Pass Parameters In URL For Javascript Refresh?

Jul 23, 2005

I have an easy question, likely, that has me in a headspin. I have an
include file to a frames based site that basically forces frames on
the end user if they visit the site and hit a non-frames created

Simply, it is:

if (parent != self)

However, now I would like to force an inner frame to populate based on
what frame someone was redirected from the include (above). So, if I
visit http://domain/frame/innerframe_3.html, then I want to redirect
to the above, but pass in /frame/innerframe_3.html to be included as a
URL parameter for an inner frame to be populated.

When I modify this link to:

if (parent != self)
self.parent.location.replace("/index.php?redir=" & location.href);

Then, the replaced location doesn't seem to recognize the ?redir=
portion of the new location.

Is there a different way to do this? I can't use a META tag because I
want the TARGET to be _TOP, basically.

View 3 Replies


Cannot Pass Parameters Containing Hyphen(-) - Dot(.)

Jun 13, 2009

I am trying to pass dynamic String parameter to my javascript. The user enters sdome value and that is passed to the javascript as parameter. My problem is when user enters something of type cs204-1 or cs204.1 etc, the javascript does not run. On passsing simple parameters like cs204 or 111 etc, the javascript works fine. I need to pass any type of parameters to the javascript ( cs204-1 or cs204.1 etc) as I am making this for my college and the values to be entered by the user are of such type. My javascript code is : Code:


I tested the working of the javascript by using alert. It came for normal parameters but not for cs204-1 or cs204.1 types.

View 3 Replies View Related

Pass Parameters In The <script ..> Tag?

Sep 4, 2010

how to pass parameters in the <script ..> tag? for instance;

<script type="text/javascript" src="script.js?param1=val1¶m2=val2&etc">

in the javascript script.js, how would we read the params after the question mark? for example, google this; google shopping cart /v2_2/cart.js

View 7 Replies View Related

Cannot Pass Parameters Containing Hyphen / Dot

Jun 13, 2009

I am trying to pass dynamic String parameter to my javascript. The user enters sdome value and that is passed to the javascript as parameter. My problem is when user enters something of type cs204-1 or cs204.1 etc, the javascript does not run. On passing simple parameters like cs204 or 111 etc, the javascript works fine. I need to pass any type of parameters to the javascript ( cs204-1 or cs204.1 etc) as I am making this for my college and the values to be entered by the user are of such type.

My javascript code is :
function deleteQuestion(id){
questionId= eval("document.form1.deleteQ"+id+".value");
I tested the working of the javascript by using alert. It came for normal parameters but not for cs204-1 or cs204.1 types.

View 1 Replies View Related

JQuery :: Pass Parameters To Selectors/has?

Oct 5, 2009

My button when click call cal function, inside cal function I need to find parent so I can access other element, but I donot know how to pass parameter to Selectors/has(for some reason $("div :button").each(function()... no work here)

Code as below:
function cal(event) {
if (!event) event = window.event;


View 1 Replies View Related

Pass And Get Multiple Parameters In Another Page?

Sep 15, 2009

Hi all.Am new to this forum so cut me some slack if I don't articulate my problem with utmost clarity.My problem is that I have a javascript function such as:

function modReg(x,y)
var answer = confirm ("Do you really want to deregister user" +x+"?")
if (answer)


Now, leo is a hidden form with the 2 fields namely "id and "two".Viewing source, I see that the parameters I need are well acquired by the function.In next page, I haven't been successful at retrieving the passed parameters.

View 9 Replies View Related

Can't Pass 2 Parameters On An Onclick In Href

Apr 12, 2010

I am having some issues with getting a variable from an onclick event with javascript.

$('#preview_logo').append('<img src="'+fileObj.filePath+'" height="100px" hspace="5" /> '' uploaded.<a href="javascript:;" id="dele_image" onclick="del_image('+fileObj.filePath+','');">Upload Different Image</a><br>');

This is for uploadify script for previewing an image that is uploaded, it creates the link fine, but won't trigger the function "del_image" unless I delete the parameters in the onclick, which leads me to believe it is something to do with my quoting. Here is the function:


View 7 Replies View Related

JQuery :: Pass Parameters Into The Plugin?

Dec 14, 2011

I have been checking out the following sitepoint tutorial on creating a plugin using Jquery http:[url]....I have some Questions about the selector and the parameters.Say for example, I wanted to pass parameters into the plugin:

(function($) {
// jQuery plugin definition[code].....

And conversely if the plugin takes no parameters $(selector).MyPlugin(); Firstly is my understanding correct and secondly what if the plugin doesn't require a selector? What if it doesn't need to do anything to a given DOM element? would it be something like:


View 2 Replies View Related

Way To Pass Parameters Via URL To A HTML Form

Feb 22, 2010

I am passing parameters via URL to my HTML form. The hardcoded hidden values work. Does anyone know how I can modify this so that the parameters can also write to the hidden values?code...

View 3 Replies View Related

Pass Parameters On B.onclick = Test Function?

May 30, 2010

I want to pass two parameters on button "b" click. how to pass parameters on b.onclick = test function?

function test(x, y){
var b = document.getElementById('b');

b.onclick = test; //how to pass x and y parameter?

View 5 Replies View Related

Can't Get Object Constructor To Pass Other Objects As Parameters

Jun 12, 2011

I have a code set up something like this:


The problem is I keep getting an error along the lines of: TypeError: Result of expression 'house' [[object Object]] is not a constructor. It seemed to work when I wasn't passing the other objects as parameters in the constructor. I just created and assigned them later. As in:


View 4 Replies View Related

Jquery :: Function Parameters - Pass Var HoverText To The Hover Out

Jun 9, 2010

I am trying to remove a title attribute for a link on hover and then add it back on mouse out. I would like to pass var hoverText to the hover out...


View 3 Replies View Related

Passing Parameters From JSP To JavaScript

Jul 23, 2005

I have a JavaScript function that receives an Array with words. This
Array can be gotten from a query to a DB using JSP.

The JavaScript function is executed when onFocus event occurs:
<input type='text' onFocus='myFunction(this.event, myArray);' />

myArray is declared as:

var myArray = new Array('j'habite', 'tu habites', 'il habite');

I want to tell javascript:
var myArray = myJSPArray;
Where myJSPArray is declared some where in the JSP document.

View 2 Replies View Related

Changing Parameters In Javascript

Mar 29, 2006

This should be simple, but can I change parameters like the url coming

document.setParam("test1", "b");


something like that? I want the parameter to change based on the code..

View 6 Replies View Related

CGI Parameters (or Equivalent) In Javascript

Jul 20, 2005

Does anyone know a way of passing parameters into a Javascript script 'from
outside' via additions to the URL -- similar to (or even the same as!) the
idea of CGI parameters?

View 7 Replies View Related

Sending Parameters To XSL Via Javascript

Feb 13, 2006

I am new to XSL and was wondering how I would send a parameter to my XSL stylesheet?

I currently am using this Cross-Browser XML/XSLT javascript code to perform my transformations. Code:

View 1 Replies View Related

Javascript Parameters Not Reaching The Servlet While Using IE7

Feb 2, 2007

On IE7 I'm using a script:

function saveValues()
var validateOK=true;
if (typeof validate !='undefined')
validateOK = validate(document.EditForm);

if (validateOK==true) {
theAction = document.EditForm.action;
if ( theAction.indexOf('?') == -1 ) {
if ( theAction.indexOf('#') == -1 ) {
document.EditForm.action = theAction + "?__haction=apply"
} else {
posit = theAction.indexOf('#')
document.EditForm.action = theAction.substring(0,posit) +
"?__haction=apply" + theAction.substring(posit,theAction.length)
} else {
posit = theAction.indexOf('?')
document.EditForm.action = theAction.substring(0,posit+1) +
"__haction=apply&" + theAction.substring(posit+1,theAction.length)

but the http parameters are not reaching the servlet.But this works
absolutely fine on IE6

what could be the possibilites for this script faliure.

View 2 Replies View Related

Query Parameters At The End Of The JavaScript File

Aug 10, 2007

I am starting to find more web pages that are using a query parameters
after the JavaScript file.

Example can be found at Within the source
you'll see: <script src="/shared/scripts/common.js?revision=1.6"

I am trying to see if there is any big deal to this or a best practice
that is starting to creep up in the JavaScript community. If this is
used only as a way to distinguish what file of JavaScript being used
why not append something inside the file? Has anyone else seen this
or know of more reasons to do this?

View 17 Replies View Related

Reading Network Parameters From Javascript

Jul 20, 2005

Is it possible to read the computers IP address and gateway address
using Javascript?

View 2 Replies View Related

Open A Popup Window From A PHP Site And Pass In Some Parameters To Use In The Pop Up Window

Sep 23, 2010

I need to open a popup window from a PHP site and pass in some parameters to use in the pop up window. I have the params in an input box and need to get the val of the box into a param and pass it to the new popup window. All pages are local and in the same folder. The id of the input box is 'ddutykey'. The name of the new window would be showduty.php if possible.

View 3 Replies View Related

Can Javascript POST Without Refresh?

Jul 20, 2005

I have a website that uses a custom built webserver to serve the pages.
(Please don't ask me why my boss had his own web server written). I am
displaying a log of information that is an unknown number of rows. This is
currently displayed in a table.

The table is generated by some code that we had to write (thank you custom
webserver) so that the webserver will parse HTML files and fill in the tags
we created with some data before returning that to the browser, the HTML
looks a lot like ASP or JSP using the <% %> tags to denote something to be
filled in.

Now all that works fine and dandy, but in order for this log of information
to show the latest stuff, the page needs to refresh and tell the server to
go get the list of log info and fill in the HTML with the info then return
it to the browser. All this happens pretty quick, but like any site, the
page blinks while it refreshes.

Now my boss wants that page to update without refreshing (the blink annoys
him apparently). At first I said that it couldn't be done, but he said that
he didn't believe me. Thus I am forced to ask you guys.

I know you can update fields like that using JavaScript. (I made a font tag
with an id and a JavaScript function resets the nodeValue. This changes the
text without refreshing the screen). But my problem now is that I need to
POST to the server to get the information without the page refreshing
(through JavaScript?). Is this even possible? I planned on getting the
data back and document.write() it all to the page.

Any ideas?

View 3 Replies View Related

Page Refresh With Javascript

Feb 13, 2003

Can anyone give me a script or a link to a tutorial on how to refresh the window from another window? Example:

I have a list of items and there is a link for each item to delete them. When I click delete a new window pops up asking are you sure. When I click yes i want that window to close and the main window with the list of items to refresh to show the change.

View 1 Replies View Related

JQuery :: Pass ('input:file') To Another Php File Without Refresh?

Aug 15, 2011

I have a form with 3 text inputs; onclick I pass their values to another php file to process everything in that file without a refresh, it works fine, but in the same form I also have a input and I need to pass its value to that other file as well, does anybody know how to do it? This is what I have:

function processform(){
{title: newpostform.titleInput.value,


View 4 Replies View Related

How To Pass Value From Javascript To Java In Jsp

Jul 23, 2005

in JSP, it's easy to pass value from java-variable to
javascript-variable, like

{ a=<%java-class.A%>

I'm wondering how is the other way around? I tried

{ <%java-class.A=%>a

but there was compiling error.

View 3 Replies View Related

Pass Values From Javascript To PHP

Apr 24, 2006

I would like to have my javascript pass some variables it gets to a php
page I have to log the inputs. The inputs are collected in forms but I
want the logging to be completely hidden from the user. Any

View 2 Replies View Related

JavaScript Image Refresh In Mozilla And Opera

Sep 15, 2004

We've got a server-side page (status.php) that dynamically generates a GIF image. The displayed image depends on the value of a boolean field in a database. Just calling the page displays the current value of the boolean, calling it with a parameter switch (status.php?switch) flips the database value and generates a new image. We've included headers to prevent caching of the image by the browser.

Whenever our HTML page is displayed in the browser, we just include an image that shows the current status: img src='status.php'/

We want to allow the user to click the image, which then inverts the boolean status in the database: img src='status.php' onclick='this.src=status.php?switch;'/

This works great in Internet Explorer, but both Mozilla and Opera only allow to switch once. My idea of the problem is that those browsers think like this; after one click, the src is already 'status.php?switch', so changing the src again would be redundent in their eyes, so they won't do it.

We found a temporary solution by generating the current time as a parameter in the image URL: img src='status.php' onclick='this.src=status.php?switch+(new Date());'/
However, this is not a very elegant solution.

Does anyone know a proper solution to this? This means, forcing Mozilla and Opera to load an image using JavaScript, even though the URL of the image didn't change?

View 2 Replies View Related

Copyrights 2005-15, All rights reserved