JQuery :: Send Href Variable To New Page Img Src?
Apr 14, 2011
I have a base html page which contains several thumbnail images with links to enlarged images which I'd like to view in an external page [so I can control the dimensions of the enlarged image]. I thought it best to use an externaltemplate html page to launch these within and therefore imagine I need to declare the variable in the thumb links page & image they may need to look something like this:
<a href="mytemplate.html?imgVar=/images/collection/large1.jpg">thumb1.jpg</a>
<a href="mytemplate.html?imgVar=/images/collection/large2.jpg">thumb2.jpg</a>
<a href="mytemplate.html?imgVar=/images/collection/large3.jpg">thumb3.jpg</a>
Then in the external page pick up the variable something like:
<img src="imgVar">
I've looked all over Google & can only see something similar to this in php. Is there a way to achieve this with jQuery instead?
View 2 Replies
ADVERTISEMENT
Oct 4, 2011
As it is shown in line 2 does everything perfectly, but I must declare the variable outside the function, as it implies the following code (line 1).
marcel
var
wert = "text";
$('#bChange'
).click(function() {
$.ajax({
url:"content/nextpage.php",
type:"POST",
timeout: 5000,
dataType:'html',
cache:false,
data: { rNeuRecht: wert },
success:function
(msg){
$("#leer").html(msg);
}});});
$('#bChange'
).click(function () {
$.ajax({
url:"content/nextpage.php",
type:"POST",
timeout: 5000,
dataType:'html',
cache:false,
data: { rNeuRecht: "text" },
success:function
(msg){
$("#leer"
).html(msg);
}});});
View 1 Replies
View Related
Aug 3, 2010
How can I get the href attribute in a variable?
View 1 Replies
View Related
Dec 24, 2011
i am trying to create a form that where the page will not refresh if the form is submitted specially if the user inputs any errors in the form my problem is i do not know how to send multiple variables using jquery to a php file i saw somewhere that in order to do this you need to concatenate the variables you will be sending this is the code i am using
<html>
<head>
<style type="text/css">
#add(display: none;}
[code]....
the jquery successfully sends the variable to the php file the problem is once i insert it into a database all the variables i sent are concatenated for example in the column stud_no once you send the form this is what will be inserted "123123name=asdasd"
View 2 Replies
View Related
Jan 30, 2011
I am trying to set up a five star rating system, I found a stock framework that I am adding to but I ran across a problem.
I cannot get the rating "number" to pass through the AJAX get call:
Code:
/*
Author: Addam M. Driver
Date: 10/31/2006
*/
[Code]....
The problem is in the sendRate function. It has the variable sel passed into it, and if i try to send sel.title it passes the title according to what the user selects, however, if i try to just pass the "sel" it doesnt get through..
how to send the value of "sel" variable to me perl script?
View 4 Replies
View Related
May 11, 2011
Here is the script I am using code...
I'm not very familiar with javascript, but I want to get a variable called $page and then set it as the save.php?savepage=$page link. Anyone please tell me how to do it?
View 2 Replies
View Related
Jan 16, 2009
I know how to pass a variable to a url using href.
(href="thisurl.php?thisvar=thisvalue")
now I want to do this using onClick, how do I?
View 9 Replies
View Related
Feb 2, 2004
I need to display the variable from PHP to ( POP ) JavaScript
$mess = "ERROR .. Please Enter the name";
Display ( $mess ) in POP Windows JavaScript.
View 2 Replies
View Related
Apr 19, 2011
I was wondering if there's way to send a variable's value to my email.
View 11 Replies
View Related
May 21, 2009
I am trying to send a variable between flash and js. the javascript is on the same html page. and since nothing is working i tried the most basic thing. in the html i have an alert like this:
Code:
Also i have in the body of the html the tags to hold the flash and i added an id:
Code:
And in the flash i have a btn that has this:
Code:
I think it is all correct but IT IS NOT WORKING! not in firefox and not in ie6 so i am thinking that it is some thing with my browzers or my computer (in other cases i do get an alert message so i know the js is working).
View 4 Replies
View Related
Jul 14, 2010
Please check out the code and tell me how can i use the variable as a href link.
var rand_link = new Array ();
rand_link[0]="asdhrfe22k";
rand_link[1]="iqh3wjhs8s";
[code].....
View 2 Replies
View Related
Oct 28, 2009
I wanted to know if there is way in Javascript to send a hidden variable to an external URL without actually submitting to the URL?
Code below is what I intend to do. I want to use an image to do an onClick event and send the name to an external URL without actually doing a submit.
<td width="25"> </td>
<input type="image" src="images/btn_Activate.gif" onClick="window.location.href='www.abc.com'">
<input type="hidden" name="name" value="<% = name %>">
</td>
View 3 Replies
View Related
Jan 18, 2011
I am trying to pass a php variable to a javascript file via a link. The link is set up as follows: <a href="video-details.php?src=<?php echo $row_videos['YouTube_Ref'];?>">
The javascript variable is a s follows:
Code:
var id = 'flash';
var src = "<?= $src ?>";
var params = {allowScriptAccess:"always"};
[Code]....
I can't get this to work for some reason
View 1 Replies
View Related
May 21, 2006
I am trying to make a variable link on a page. The page has a text box
for a stock symbol. The code is: <input type=TEXTBOX Name="symtb"
value="" size="10>
The value of the text box {the stock symbol} will complete the url.
I found code for a variable link:
<script language="JavaScript">
<!--
function variable_in_link(varible_value)
{
new_win = window.open('http://finance.yahoo.com/q?s=" +
varible_value'')
}
// -->
</script>
The link I am trying to use is: <a
href="javascript:variable_in_link(symtb)">The text</a>
No matter what I do the variable_value comes back as undefined. There
is always a value in the text box.
View 6 Replies
View Related
Jan 20, 2011
im trying for last 4 days. please help me out
Code:
<input name="name" type="text" value="Raj" />
<a href="01.php?name=(document.getElementById('name').value" class="nyroModal" rev="modal">click here</a>
View 2 Replies
View Related
Oct 26, 2005
For ease of future modifications on my page, I want to have a list of URLs stored in an Array, and I want to then use these URLs in an href tag. Something like this:
<SCRIPT>
menuURL[0]="page2.htm";
menuURL[1]="javascript://";
...
</SCRIPT>
<BODY>
<A HREF = menuURL[0] ........
How is something like this possible, as well as being fairly crossplatform, and intuitive? I've changed the syntax, and tried various other things to no avail.
View 3 Replies
View Related
Jan 4, 2011
When I click the name, I should go the particular page about that person.
<script type="text/javascript">
if (window.ActiveXObject)
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.onreadystatechange=verify;
xmlDoc.load("a.xml");
[Code]....
View 1 Replies
View Related
Sep 28, 2010
I want to be able to send data store in JavaScript variable to my email account.
I have tried using mailto: command and for some reason it doesn't work.
View 1 Replies
View Related
Aug 23, 2010
I have an existing website I an trying to modify. In speedscript I have my include libraries and a veriable. Then I need to do an href with a link I have the code as follows <a href="WI_testweb/" + "custno" + ".xls">Matrix</a> The custno is the variable. Is there a way of doing this since the way I an trying is not working?
View 4 Replies
View Related
Jul 20, 2005
I'm trying to use the following script:
<script language="javaScript">
function setrepto(){
document.aForm.repno.value =
document.aForm.rep.options[document.aForm.rep.selectedIndex].value;
}
</script>
On the following form (Partly in asp):
<form name="aForm">
<select name="rep"
<option value="ALL">Select a Rep Here</option>
<%
while not slsrs.eof
repno = slsrs("SLS#")
repname = slsrs("SLSNAM")%>
<option value="<%=repno%>"><%=repname%></option>
<%slsrs.movenext
wend%>
</select>
</form>
To change the value of 'repno' in the following href, which is on the
same page:
<a href="nextpage.asp?rep=<%=repno%>">Click here</a>
So basically, as a user changes the selection, the value of repno in
the above href should change.
View 3 Replies
View Related
Apr 15, 2010
So my problem is that i can't send form data in FF without page refresh (though in IE7-8 everything works smoothly).
My code fragments:
View 1 Replies
View Related
Jan 10, 2011
I have an webbpage, and in the middle of it there is an iframe to a php site. So i have used this code, so after some seconds the iframe will send the guest to another page. <meta http-equiv="refresh" traget="_top" content="5 url=http://mypage.com"/> But the thing is that i want the WHOLE page to reload, and go to that page after 5 seconds (we can say). With that code, only the iframe are going to another page. Is it possible to make the whole page send the user after some seconds, to another page and not only the iframe?
View 1 Replies
View Related
Jul 12, 2010
I'm using the following code (simplified version) to call a Json file, parse it and on each iteration, create a div with an ID of "tab". I'm using this with jQuery UI .tab() to create a listing with entries which have three tabs. Anyhow, the principle seems to work except that when I examine what's happening behind the scenes using Firefox console, I see that each href in the html code produced is causing the Json function to re-fire using the href as it's url target.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
[Code].....
View 6 Replies
View Related
Mar 24, 2009
I am facing some problem with this when i am trying to sent the data in krnlAddComment1.asp page and there is only an insert query exists. after run the query successfully, response.write "...." revert back to me
if ((myname != null) && (comm != null) && (captcha1 == randomnum))
View 1 Replies
View Related
Mar 4, 2010
I have an error when I POST to a page. Whatever monetary choice of donation that is made, the POST does not work to send the values to the next page and the default value of $20.00 is registered.
After looking at my code for a day I dont see the errorL
Here is the code
Contributions are tax deductible for residents of the United States and Jamaica.
Yes, I want to become a contributor. Please accept my donation as indicated below.
[/code]
Here is the test site. [url]
For this test all menu choices takes to the Donation page.
View 8 Replies
View Related
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