iPhone App - 20/20 Vision - http://2020visioniphoneapp4.weebly.com
--
You received this message because you are subscribed to the Google Groups "Website Design Nz" group.
To unsubscribe from this group and stop receiving emails from it, send an email to website-design-nz+unsubscribe@googlegroups.com.
To post to this group, send email to website-design-nz@googlegroups.com.
Visit this group at http://groups.google.com/group/website-design-nz?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Access form input value in JS variable problem
I have a form for which I cannot change the input value field names. One such field is in the HTML as follows:
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<body> <form id="f" method="get" action="/code/submit.php"> <input type="text" name="var[list]" id="ixv[list]" value=""> <button type="button" title="Save" onclick="check();"> </form> </body>
Now in my javascript, I want to access that input value. I tried this, and of course it doesn't work since [] looks like an array in JS.
function check() { var x=var[list].value; alert(x); }
The problem is that the variable name has [] in it. How can I get that input field value in javascript?
--You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Changing image src before it's rendered?
this jquery simple model add-in code works great to popup a fiXed image http://www.ericmmartin.com/projects/simplemodal-demos/ i'm trying to use inside an asp.net datalist solutoin that grabs images from a directory, but the problem is not ASP.NET or C# related.
can't seem to make it DYNAMIC CHANGE WHICH IMAGE pops up (see this post for details).. If I use a set img src it works
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script type="text/javascript">
function ShowFullImg(url) {
var img = $("#<%=Image1.ClientID %>");
img.src = url;
function ShowFullImg(url) {
var img = $("#<%=Image1.ClientID %>");
img.src = url;
}
</script>
</script>
<div id='container'>
<div id="basic-modal-content">
<asp:Image ID="Image1" runat="server" />
</div>
<div id='basic-modal'>
<ASP:DataList id="repeater1" runat="server" repeatdirection="Horizontal" RepeatLayout="Table" Repeatcolumns="5">
<ItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="ThumbnailImg" class="basic" ImageUrl='<%# Eval("n1") %>' Height="100" Width="150" BorderStyle="Ridge" OnClientClick='<%# Eval("n2","ShowFullImg(\"{0}\");return false;") %>' runat="server" />
</ItemTemplate>
</asp:DataList>
</asp:DataList>
</div>
</div>
</asp:Content>
I suspect my problem is when I'm calling the javascript that updates the image.src i've likely already bound.
Agaom. my issue is NOT ASP.NET or C# related - at it is building the grid of thumbnails. I just want to be able to change the image that pops up (Image1) with the correctly selected image.
No image pops up,just an empty popup box box. My rendered code looks like this:
<script type="text/javascript">
function ShowFullImg(url) {
var img = $("#Maincontent_Image1");
img.src = url;
}
</script>
<div id='container'>
<div id="basic-modal-content">
<img id="Maincontent_Image1" src="" />
</div>
<div id='basic-modal'>
<table id="Maincontent_repeater1" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td>
<input type="image" name="ctl00$Maincontent$repeater1$ctl00$ThumbnailImg" id="Maincontent_repeater1_ThumbnailImg_0" class="basic" src="products/af/124-2424_IMG.JPG" onclick="ShowFullImg("products/af/124-2424_IMG.JPG");return false;" style="border-style:Ridge;height:100px;width:150px;" />
function ShowFullImg(url) {
var img = $("#Maincontent_Image1");
img.src = url;
}
</script>
<div id='container'>
<div id="basic-modal-content">
<img id="Maincontent_Image1" src="" />
</div>
<div id='basic-modal'>
<table id="Maincontent_repeater1" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td>
<input type="image" name="ctl00$Maincontent$repeater1$ctl00$ThumbnailImg" id="Maincontent_repeater1_ThumbnailImg_0" class="basic" src="products/af/124-2424_IMG.JPG" onclick="ShowFullImg("products/af/124-2424_IMG.JPG");return false;" style="border-style:Ridge;height:100px;width:150px;" />
Many Thanks in advance for you help
-- You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Posts (Atom)