Refernce Form Elements Using Href
I have a problem with reading data from a form element(s). Instead of using a Type=Submit, I have chosen to use a hyper-link to call a select case structure which adds, edits or deletes a record depending on the contents of the action property.
here is a couple of lines showing two text box's in my form, directly following is the href that passes data to the select statement.
<td><input type="text" name="Desc" id="descid" size="55" /></td> <td><input type="text" name="Units" id="Text1" size="4" /></td> </form>
<td align=right><a href="<%= SCRIPT_NAME %>?action=add&jdate=<%= dDate %>"><img src="Web-add.bmp" alt="Add" width="63" height="25" border="0" /></a></td>
I would like to include the values from the form elements in the action string but have so far drawn blanks. I have attached the full form code.
View Replies
ADVERTISEMENT
I have a form that is dynamically generated since it is populated with values retrieved from a database. The form can of course also be submitted, which is where I run into some problems.
Since I never know in advance what the length of the form (or for that matter what the different elements' names and values) will be I don't know how to write the code in "receive.asp" to retrieve all values from the form correctly without excess use of "request.....".
I shouldn't have to write requests for every single potential element name that is stored in the DB. Please note that the form can sometimes also contain radio buttons and check boxes, even though they are not present in this short example Code:
View Replies
View Related
Is there any way to extract the form elements' value without submitting the form. I want the value of the form element be used in the script written in the same page without submitting the form.
View Replies
View Related
Here is my input box which has the employee id.
<input type=hidden name=empid value=40578>
In my SQL query, I would like to call the value of "empid" textbox in my SQL Query. How can I do this? Code:
View Replies
View Related
My client wants File Uploading in ASP that i can do but the requirement says that i should have one FORM FILE FIELD first to browse the file to upload.
and the moment i click the browse button of first FILE FIELD, a second FILE FIElD is generated beneath it and when the user clicks on the second Browse button it generates the third and this process goes on. Untill the user clicks the upload button to upload all the files.
I know this sounds stupid as it is much easy to provide 5 Form File fields and if user wants more then another five is added on another page, but ti is clients requirement .
I dont know how to dynamically Generate Form FILE FIELD for browsing file to upload AT RUN TIME .
View Replies
View Related
I asked a question earlier about creating dynamic pages.
I want to know if its possible to create dynamic form elements based on a condition equating to true.
e.g. as you could have dynamic texts when a condition is true.
Could i have dynamic form elements when a condition is true
e.g. response.write(create radio button)
or create combo box etc
or how is it done ?
View Replies
View Related
How can I check to see if a form element exists on a form that has been submited? I have a load of checkboxes called box1 box2 box3 etc. I want to create a loop which gets the value of the box (checked or not), but there is an unknown amount of boxes so I want a loop:
Do While (box(i) exists)
check value
i=i+1
Loop
how do I do this?
View Replies
View Related
When you submit the form you can see I am trying to get the each row of the form elements into a format such that I can build multiple insert statements. Here is what I am working with:
<%
Dim x
For x = 1 to Request.Form.Count
Response.Write Request.Form.Item(x)
Next
Would I use some type of Mod operator on the value of x to determine my line breaks?
View Replies
View Related
I have a table that contains all of the function permissions within a given application. These functions are different sections of a site and each has its own permissions (READ, WRITE, UPDATE, DELETE) which are controlled by a web frontend and the table
records are manipulated to control the permissions. Code:
View Replies
View Related
I want to set up a simple database for my mom to enter her recipes into. I am going to use Access and ASP. In the database, I will have five fields (Recipe_ID, Recipe_Title, Recipe_Ingredients, Recipe_Instructions, and Recipe_Image). When my mom goes to enter a recipe, I want to ask the form to ask my mom how many Ingredients?
She will then specify "n" number of ingredients which will cause the page to display "n" number of text boxes. I can figure this part out myself. When the form is submitted, I want a script that will read and concatenate the ingredients, wrapping <li> tags around each one. The challenge for me is the reading of an undetermined number of form elements?
View Replies
View Related
Have you ever been on ebay-You know when you are checking a persons feedback history, you see a href link to go and see that particular item.
I would like to do the same. If i have a table which i populate with information, if the user clicks on view, i would like to go and show that particular item on another page. Ebay has one unique key (item number), unfortunatley i have a composite key.
How can i do this by adding a href in an asp table and also by having the ability to go directly to the full information about that specific item?
I have done something similar in vb but i used a mshflexgrid but i don't think thats a possibility in asp.
View Replies
View Related
I have a master table of records from a recordset on which thereis a link to a detail page as follows: Code:
<td width="10%" align="left" class="langdetail"><a href="Advanced_Search_detail_template1.asp?<%= Server.HTMLEncode(MM_keepBoth) & MM_joinChar(MM_keepBoth) & "TeacherID=" & rsViewMusic.Fields.Item("TeacherID").Value %>"><%=(rsViewMusic.Fields.Item("LastName").Value)%></a> </td>
Is it possible to have to include an if then statement to have 2 different detail pages according to an access level (a field in the recordset)?
View Replies
View Related
I saw an url like this
<a
href="{nocache:426d6de96f848e23f89ef8d2a557145f#0}&p=http://www.isbuluyorum.
com>CLICK</a>
What is the purpose of using href="{nocache:1321sdsa . Does anyone have idea about it ?
View Replies
View Related
Can anyone tell me the proper syntax for this statement:
Response.Write "<a href=""Showevent.asp?eventid=<%= objrs.Fields("eventdate").Value %>""">(objRS("eventcaption"))</a>
View Replies
View Related
I would like to have a link that when clicked, sends info to an ASP page to process, but does not submit the entire page. This way, the user will
click on a link and will not be taken to another page, but precessing will occur.
This is mainly for a 'Rating' Application.
Amazon.com does this and I want to know how they do it. Here is the link to the amazon page (you may need to be logged in)
http://www.amazon.com/exec/obidos/t...5480771-6490552.
View Replies
View Related
I'm using W2k Pro, ASP 3, IIS 5 & DWMX 6.1 and code in VBSCRIPT
I currently use the <BASE href=XXXX> in all my pages and just read
that this tag is no longer supported so will soon vanish
I have a couple of sites that I'm working on and to make all my links
work right etc I need to use the base href tag
http://localhost/site1/
http://localhost/site2/
http://localhost/site3/
where online the base href would be
http://www.site1.com/
http://www.site2.com/
http://www.site3.com/
all my links are like <img src=images/mylogo.gif> or <a
src=info/info.asp>Info</a>
Now my problem is how else would I design my sites if I cant use the
Base href tag so the site would work both on LOCAL & REMOTE servers as
needed in the above paths?I'm sure other people develop on a WIN 2k PRO system where you canonly have ONE site (c:inetputwwwrooot) Which was fine when I only
had one site... but when I needed a second I had to change my first to
use the Base href so I could check the sites out locally (offline)
before uploading them to a live server.
View Replies
View Related
when i click the a link i want to see a thing which is like save as target
...
it can be a word doc or xls or whatever. i want to make it dowloadable when
a user click a link.. Code:
View Replies
View Related
If you have a href such as this,
href="somepage.asp?home=alpha&street=beta, how would you include a reference to a bookmark on that page, such as <li id="bookmark">Some List Item</li>
View Replies
View Related
Is it possible to use If Then statements in an a href tag? What I am trying to do is I am using a server side include page of navigation inside of a content management system. I have limitations on what I can manipulate and change. So just using style sheets won't do me the trick. I want to have a navigation link change a different color when you are on that section. I have the menu expanding also using if then statements. When a variable is passed somewhere else on the page as true, the menu expands. I figured I could use this in the same way to make the link change colors. I want to do something like:
<A href="#" <% If Variable_name then%> id="link <% end if %>>Link Here </a>
Is that possible? I know that i can do an If then statement and have 2 different links, one with the id and one without, but I wanted to see if I could simplify it at all. I'm not the best with ASP so there might even be better ways then that...I was just using from the little that I knew.
View Replies
View Related
How can i use the variable name instead of a hardcoded value when writing a hyperlink.
strBody = strBody & "<a href="default.htnk">Login</a>"
I would like to use a variable name instead of directly writing default.html like below
strPageName = "default.html"
strBody = strBody & "<a href="<%=strPageName%>">Login</a>"
how this can be done.
View Replies
View Related
Is it possible to create a link to open outlook (Client side) to open a particular folder
here is the code i am trying to use unsuccessfully :
<a href="outlook://Public%20Folders/All%20Public%20Folders/P/W/C/Conf
%20Room/~S%20C%20R">Conference Room 1</a>
Basically what i want to happen is that when a user clicks on the web link that it opens the meeting room which is in a public folder in outlook application (not the web interface outlook.
View Replies
View Related
My href statement as follows isn't working and in fact prohibits the rest of the asp on the page from working. Code:
View Replies
View Related
i'm having a bit of trouble inside a loop displaying values for session variables that are wrong the code thats not working looks like this:
Code:
Response.Write"<tr><td>Answer "&counter&"</td> <td><input type=text maxlength=50 id=option"&counter&" size=50 title=answer"&counter&"value value='"=session("answer"&counter&"")"' name=answer"&counter&" /></td></tr>"
its enclosed in a loop with the counter element increasing to the given total and its meant to set the value of the text box (the session variable) to display the value.
in plain ASP and html all thats needed for the normal input box to display a session value is :
Code:
value="<%=Session("variable")%>"
View Replies
View Related
i have one array of string and it contains 51 elemnts. it will get bigger and bigger but i want to read these array ellments from a text file.this is possible?
View Replies
View Related
I'm using Visual Web Developer Express 2005 to get me started - probably a bad idea I'm told. Anyhow, I've connected a drop-down list ('Components') to a column in a SQL DB, and, upon selection, the resulting gridview is being generated as I hoped (with the corresponding 'Applications').
However, I would like each of these resulting rows in my gridview to be "clickable" as a hyperlink so that I can display each of the applications details on another page. If someone could enlighten me as to whether/not this is even possible, and if so, how?
View Replies
View Related
I am aware of how to create elements, attributes on the fly with the Microsoft.XMLDOM however I was wondering if anyone had any examples of how you could extend this to insert the content created in to an existing node.
Eg
<root>
<section> <- INSERT ELEMENT HERE -> </section
</root>
View Replies
View Related
In my ASP page I have a set of menus on the left side and list boxes just on its right side. Whenever I click on a menu and the submenu appears it gets hidden under the listboxes and cannot be read properly.
The page design cannot be changed at this point of time and the listboxes cannot be moved to any other position of the page. So is there any property or function so that I can make my menu elements appear above the listboxes.
View Replies
View Related
Like in PHP you can use:
PHP Code:
$length = count($array);
Is there an ASP alternative? I'm using VB4.
View Replies
View Related
I am new to web design and ASP, I am developing a site which has a logon script, what I want to do is return a user to the location they were at after login. Some of the pages will have query-string information in the address bar so need capture that as well.
<script language="JavaScript">
x = window.location.href
document.cookie=x
</script>
Appears to do what I want as I can pick up the href out of the cookie after login and return user to page, prob is I don't seem to be able to include it in my server side scripting which is doing the login it falls over at the script tag.....
View Replies
View Related
I have the following href in my asp code. I would like to disable the image
so the user cant click on the javascript for this image.
....
<input type=text name=thedate size=10><a
href=""javascript:show_calendar('dataform.Line" & lineno &
"6',null,null,'YYYY/MM/DD');"" onmouseover=""window.status='Date
Picker';return true;"" onmouseout=""window.status='';return true;""><img
src='../Production/show-calendar.gif' width='24' height='22' border='0'></a>
Is this possible?
View Replies
View Related
I am using Javascript with ASP and am having a problem with a javascript link in that it does not function when clicked. The page is generated correctly without any visible or runtime errors.
A bit of background as to what I'm trying to achieve: i am dynamically creating multiple forms which store details of a products into hidden fields, the information is retrieved from a database recordset. Each product is created in a unique form, this is achieved using a counter variable. I am trying to use javascript to submit the current form - i.e. a hyperlink - which unfortunately doesn't have any effect when clicked. I am thinking I might need to refer to the form differently but am unsure how to.
Below is a sniplet of the source code ....
View Replies
View Related
I want to redirect to other page using document.location.href on Button click and pass ID to that page e.g;
<input type="submit" value="Submit" ONCLICK="document.location.href='mergestatus.asp?projectid= <%=selRs("projectid")%>'">
Please help.I am not able to pass projectid to 'mergestatus.asp'
View Replies
View Related
I have an asp page that is pulling data from a access database. The data will always be a complete email address. I am trying to make the email address on the page a simple hyperlink that opens the default email program upon click. I cannot make it work for the life of me!
<TD align=left><FONT face=Gautami size=2><%=addrRS.Fields("E_Mail")%></font></TD>
View Replies
View Related