Inserting XML Elements
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 Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Asp Session Elements
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")%>"
Array Elements
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?
DB Elements As Hyperlinks
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?
Menu Elements
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.
Removing Empty Elements
I have this form that collects text values and I use VBCrLf as delimiters to tell one element from another. Sometimes, I get several empty elements. Is there a way to remove those elements?
Display Elements By Date
I have an html file where I put a date (im_lixis) in a form and I also have an asp file that checks this date and if this date exists in my table timologisi in ms access I want to display all the recordsets with this date. I dont know what I'm doing wrong... but when I run it.. it takes some time and then tells me that I got out of time ... without telling me if I have something wrong in some line Code:
How To Get Number Of Input Elements?
Does anyone know how to get the number of input tags contained in a div tag? I am trying to build a dynamic list of checkboxes from a database and I don't know how many checkboxes i have until the form is built to do some validation. Probably using client-side javascript - something like var obj = document.all.tags("div").item(0) var mydiv = obj.id.indexOf("chk0100") But I am not sure how to specify the name of the input tag. I dont know what the above statement does.
Extract The Form-elements' Value
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.
Fill All Elements In An Array
this may seem like a very basic question but one I could do with having answered!! I have an the following array TableArray(20, 100) and I need to start off with all elements in the array to hold the value 1. Is there a simple way of doing this or do I have to loop throuugh the array setting the values?
Delete Individual Elements
I would like to remove individual elements from a vbscript array without just blanking out that element. Is this possible?
Record Set AutoNumber Elements
Why won't this code work - the "id" fields are autonumbers Code: <select size="1" name="Agent" tabindex=""> <option value="Select">Select Owner</option> <% x = rs("id") Do While NOT rs2.eof y = rs2("id") Response.Write "<option value='" & rs2("id") & "'" If x = y Then Response.Write " Selected" End If Response.Write " >" & rs2("first") & " " & rs2("last") & "</option>" & vbCrlf rs2.MoveNext Loop %> </select>
Master Pages And There Elements
I have a master page with one Content Pane, on the left is a Nav bar that has a Login View in it so if the person is an Admin they see on thing if they arn't they see another. For the regular users I have a gridView that displays a lists of dates pulled from the database. I want to access the selected value there normally if it was inside my content page i could just do Code: EventID = ((Label)GridView1.SelectedRow.Cells[1].FindControl("Label1")).Text; But now except GridView on is no longer in my Content Pane but on my Master Page how do I reference to it?
How To Use Form Elements Value For SQL Queries?
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:
[ASP/VBscript] Creating Empty XML Elements
I'm using MSXML2.DOMDocument.4.0 to create an XML document on-the-fly. Everything is going great except that at some point I need to create an empty XML element with a start and an end tag, not only an end tag. Eg. I need to create <Signature></Signature> instead of <Signature /> However, MSXML2.DOMDocument.4.0 refuses to create the empty element with a start and an end tag. It insists on creating only the closing end tag, even if I try to set text value for the element to "". Code:
Generate Dynamic Form Elements
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 .
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.
How To Not Cache All Elements Of A Web Page Download?
I have to continuously download the same web page on our IIS server. It is important to always download a fresh page from the server including not only the .asp page itself but all the .gif and .jpg files associated with that page. We need to measure statistical info on how long it takes to download. If the page is stored in the client machines internet cache that would be a problem. Now I know how to add the following to the main .asp page to insure a fresh copy is always downloaded of this page itself. <% Response.Expires = -2000 %> When I look at the client machines cache folder it does show that the main ..asp page has expired an hour ago. However all the .gifs and .jpgs , etc downloaded with the main .aps page show the value Expire: None which I conclude means that these pieces are not redownload each time we get the main .asp page. Up till now we have been using a perl script to try and erase the cache before each download. This works sometimes but not all the time. Is there any way to force the .gifs, .jpgs etc. to have to download fresh each time just like I was able to get the main .asp page to redownload with <% Response.Expires = -2000 %>
ASP: Creating Dynamic Form Elements
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 ?
Server Side Validation - Can't Loop Elements In ORDER!!!
I wrote a sever side form valiation script that loops through the form elements building a string in the process. If you submit the form without filling in any fields you will get the error message in read at form's top. Look how the fields in the error message are completely out of order. Why is this? Code:
Adding Elements To Dropdown List From Popup Window
I am designing a website to records details of people who visit our company. When entering a visitors details I wish to record the company that they work for, to save the user time a dropdown list of companies is populated dynamically from the backend (Oracle) database. In the event of a company not existing in the database the user would have to go to the page to add a new company and then come back to the form meaning that they would lose anything they have already entered. What I am trying to do is to enable the user to click on a link which will bring up a pop up window into which they may enter the new company, on closing down this popup the new company will be added to the dropdown list. So far I have got the popup to display and to accept the user input and I have inserted this new company name into the database with a unique reference number generated by a sequence and before_update trigger. The following code is for the popup window and accepts user input, writes it to the database and closes the window: Code:
Build DB Insert Statement Dynamically - Loop Form Elements
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?
Submit Form Elements To Insert Multiple Records Into A Database
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:
Read & Concatenate "n" Number Of Form Elements Into Database
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?
How To Retrieve Form Values, When Form Elements' Names Are (almost) Unknown?
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:
Including Inverted Commas To Specify Page Elements While Page Is In ASP
I am having a problem with a site that I am developing - my aim is for it to validate as XHTML Strict however, I am running into a couple of problems validating it; in my Response.Write ASP script, I am not including " 's to define page element tags as they keep throwing up errors in the page. Code:
ASP Inserting (')
There i seem to be having a problem when inserting certain characters into my access database using a form, mainly (') characters.
Inserting Into
I get the following error message Microsoft VBScript compilation error '800a03ee' Expected ')' /weblinkup/chat.asp, line 1775 oConn.Execute("INSERT into chat (username,nametext,roomname,type,priv,thetime,msg) VALUES ('" & username & "', '" & username & "', '" & Roomname & "', 'msg', '0', '" & now() & "', '" & username & " has just said " & emotetarget & "." ')") what the problem is with the code?
Bulk Inserting
I have an error as follows: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC SQL Server Driver][SQL Server]Could not bulk insert. File 'c:mydata.csv' does not exist. My mydata.csv file is inside the directory i stated. But why does the server complains that the file is not fould? My codings: strSQL = "BULK INSERT NAME FROM 'c:mydata.csv' WITH (FIELDTERMINATOR = ',',ROWTERMINATOR = ' ')" Response.Write ("test") Set oRS = conn.Execute(strSQL)
Inserting Database
I had some Error when i write the update sqlp query Error Type: Microsoft VBScript compilation (0x800A0401) Expected end of statement /fyp/Quiz/updateQuiz.asp, line 21, column 77 SQL_query= "update Activity_Status set UserID = '" +Request.Form("username") "'" "where Score = '" +Request.Form("QuizScore" + "'")" Code: SQL_query= "update Activity_Status set UserID = '" +Request.Form("username") "'" "where Score = '" +Request.Form("QuizScore" + "'")"
Inserting Data
I'm wondering if it's possible to create an instance of an ADO Recordset and add values to it by ASP ?? Ex : I have 2 arrays : arr1 = Array(1,"allo") arr2 = Array(2,"bonjour") Is it possible to add these 2 arrays into a Recordset to manipulate de data more easily? If yes, could you provide me with a little example to see the synthax, because I tried almost everything and it didn't worked at all
Inserting Smilies
how do i design my site interface such that users can insert smilies along with text in the form field just like it is here on sitepoint...
Inserting Record
i've tested my code and it seems to send back an error, when i'm trying to insert a record into my db (sql server) Basically when I udpate one of the records it's fine ( I update at a certain "productID") But when I insert a new record it sends back an error telling me that my "productID" can't be a null value?Any ideas on how to fix this?
Inserting Apostrophes Into DB?
When I insert info into a DB from a form, it cuts the string off at the first apostrophe ("). How would I make it insert the data as-is, with the apostrophes? Here is the code used to insert the Data:
Inserting And Downloading
I am developing web pages , therein doing database connectivity using ASP with Microsoft Access.I want to insert a file (.opt/.pmopt) into a field 'OLE Object'. Also I want to display that file name in tabular form and a link to download that file.
Before Inserting Data
I am trying to make a web-based front-end for one of our programs. I'm running into a problem. Here's a sample of one of our tables: Code: CaseNo ChargeCount ArrestCharge FiledCharge 123 1 13 13 123 2 14 14 199 1 03 03 The ChageCount column cannot have nulls and must be unique. is there a way when I'm adding a new charge, i can check to see if a chargecount exists? For example, if inserting a new record, it will first check if there is a chargecount, if there is not, it will make it 1. if there is a charge count, it will +1 to the existing chargecount
Inserting Characters
Im doing a update page and noticed this error, whenever you want to write for example "can't, i've" it errors on submit, but characters like "." are okay. Why doesn't it like these characters and how can i make it like them? I need some extra code?
Inserting Into A Database
I have the folllowing page where a user can add a review to the website. So far the page works fine, but on the review rating section I know that the rating is between 0 - 5. But its posible for a user to enter 1000 if they wished, which still means the page works but the answer is too high. Also if they write text in the field it errors the page. How do i code this so that they can only enter a number between 0 and 5 and only a number and not text.
Inserting Link
I want to make a button just like here (when posting new thread) to insert hyperlink into text. For example when user is typing text into textarea I would like to have also a button that can enable users to post different links to other intenet pages. And I would also like to have button that makes the text bold (Actually those are buttons that appear on most forums when posting a new thread)
Problem In Inserting
I got a webpage in which I am cheking various checkbox values.Actually the problem that I am facing is that,I am not able to insert the contents in to the database. But no error is coming.What I am doing is that,when the user submits the form,using a retrun querystring,i am storing all the checked values in to an array.I am able to print this array with correct output.But whn i am trying to insert in to the database,it is not getting inserted.
Inserting Into A Table
I'm having problems inserting into a table in an oracle database. I am reading in variables from a ASP form and trying to enter these into the database. however only numbers will insert, even though I can print out the string variables on the ASP page. IF I inclose a string value in the insert statement it works ok so there is nothing wrong with my SQL code. Code:
Inserting A Zero In A Table
I am right now calculating distance between 2 zip codes and storing them in a table along with extra information like a persons name and address and stuff like that. For some reason for distance "0" ..doesnt get inserted in my table..? What do i need to do in my code so that "0" distance + information gets in the table since i need that info to be displayed later for people to make calls to those people with 0 distances.
Inserting New Records To DB
I have created an online database for a school project, and everything WAS going fine until today. I created the add record page and for some reason, whenever i try to add the records to the database THIS error message comes up: Code:
Inserting Into A Databse
I have successfully pulled data from an LDAP server and now what I want to do is drop the data into a database table. The following is my code that will insert the data but that has problems.
Inserting A Date
I have a form that I submit to an oracle database. Along with the info from the form I want to insert the date it was submitted. How should I go about doing this? I am having problems because it is the wrong format? I am using a 'date' data type for the field. How can I convert the date into the correct format that will allow me to submit it, I have tried using to_char or to_date, but they give me an error?I tried using this to convert it, but it doesn't work, I am getting a syntax error?submit_date=to_date(date,'YYYY-MM-DD')
Inserting Records
what the best way to update a ms access database from an asp page is.I have a db with 3 different tables,these tables are bound to each other via the relationships. On my asp page,I want to create one page where the user would enter in information and hit submit.The problem I have though is that how do I have only one button that will update information from 3 or more tables all at once?
Inserting Record
I am trying to insert a record into an access database, to just one table, using an insert form created from dreamweaver.However when i open the page, enter the details and click submit, it re-directs me back to the same page, rather than the confirm one. The weird thing is, i created an identical page for to insert a record into another table in same database and it works fine. There is also a problem when trying to update/delete a record from the same table.
Inserting Character
How do I insert a space after every 4th character in a string?I'm presuming I somehow use the replace function?
|