I have a form input field and a link right beside it...
The input field is a text based field it will contain a name from a list of current names... the link is a search button which brings up a smaller window if the user does not know a name... this way they can search in the smaller window using a dropdown menu otherwise just type the name into the form... my windows and stuff pop up fine but i can't figure out how to make the value of the input field equal that of the selected information in the pop-up windows form field when it closes...
I use mostly PHP with my office's website as it usually requires some interaction with the server. However, i would like to do something that does not,and figured JS should be able to take care of it.What i would like to do seems rather simple:I have a calendar. I would it to do one of two things:
1. Using onclick, when the user clicks on a date, i would like it to print something underneath the calendar. Similar to an error message that shows up on a login form if you type something wrong in a field using PHP (if(isset($whatever))).
2. Or using onMouseover, if the user hovers over a date that i have something special scheduled, i want a message to either pop up (alert()) or similar to #1, show up below the calendar.
While fiddling with it this afternoon i figured i was close, but i am missing something...
Ok I got a form page - i was thinking of putting simle "question mark" hover style icons next to every field - explaining what we need for that partucluar field - you know the deal?
i have a form, and for the user to upload a file, i use window.open with my upload script. however, after the file is uploaded, i want the filename to be put back on the original page in an input text field. how would i go about doing this?
I have a HTML form containing two text box controls in it and a submit button. When a user enters information in those two textboxes and click on submit, the information is sent to a function in Javascript. In the javascript, the information from those textboxes is stored in a javascript variable. The problem is as follows:When I am inputting string text in the html text boxes and in the javascript when I am trying to print those values, it is giving me out an error saying NaN. However when i input integer values in the text boxes it is printing those numbers. Is there a conversion that I have to do for the string to be printed. I am new to Javascript and need your help. This is a basic code of Javascript. Below is the code that I have.
<html> <script type = "text/javascript"> function square(form)
Attached is the code. It does open the email but does not send any information. <!-- Table 2 for the Content --> <form name="orders" onsubmit="return confirmSubmit()" onreset="return window.confirm('Are you sure you want to reset your Orders.'); " action="mailto:lynette@sayorkies.co.za" method="post" enctype="text/plain">
// Function to Confirm certain conditions and confirm to proceed with order function confirmSubmit() { var itemsOrdered = true; if (document.forms[2].totalExcl.value == 0 || document.forms[2]delivery.value == 0) { itemsOrdered = false; } if(itemsOrdered != true) { window.alert("You have not chosen any products to purchase or No Delivery Option selected."); return false; } var submitOrder = window.confirm("Are you sure you want to place the order?"); if(submitOrder == true) return true; return false; }
// Function to calculate order value function calculateValue(orders) { var orderValue = 0; .....
I have a form, and when a user inserts their username (desired) I want the text they enter into that field to automatically appear inside another field. However, this other field also already has a default value which is a folder structure, I want to leave the folder structure in place /publuc_html/ftp/ and add whatever has been added to the username field to the end of this so the folder will then read /publc_html/ftp/steve and if possible include a trailing slash. I have the form and input fields, just cant figure out how to add the above function to it.
I'm trying to display information submitted by a form using javascript. I have this code but it only works for the first question and it doesnt work on click (it works when you select the arial button). I want my users to be able to select a button from every question and then press submit and the infomation will display what they have selected if that makes sense?
I have set up a page which when I click the button BlockUI does what is supposed to do as well as jquery Form plugin; however, the success and failure messages are displaying in the blockUI. What I would like is for the success and error messages to replace the form. The code I am using:
Is it necessary to use cookies when you want to save information in a form textfield and be able to click back to that page and the information is still there before submitting it. Sometimes it seems to stay sometimes not?
I've been doing PHP for a couple months, but just came across jquery today. I'm making a wedding-registry-style wishlist site for the holidays, and one of my pages is a list of all the items on your wishlist for you to modify.
Here is my jquery script, which I had learned from a tutorial: <script type="text/javascript"> $(function() { $(".submit1").click(function() { var item_name = $("#item_name").val(); var item_notes = $("#item_notes").val(); var imgid = $("#imgid").val(); var price = $("#item_price").val(); ..... var dataString = 'item_name='+ item_name + '&imgid=' + imgid + '&price=' + price + '&item_notes=' + item_notes;
My forms are structured like so: // PHP WHILE STATEMENT // Retrieve data about item <form> <input type="hidden" name="imgid" id="imgid" value="<?=$imgid?>"> <input name="item_name" type="text" id="item_name" value="<?=$item_name?>" /> <input name="item_notes" type="text" id="item_notes" value="<?=$item_notes?>" /> <input name="item_price" type="text" id="item_price" value="<?=$price?>" /> <input type="image" class="submit1" src="images/edit_item.png" border="0" /> <span class="success" style="display:none">Item updated!</span> </form> // END WHILE STATEMENT
Now, the problem is obviously that when this HTML code gets repeated, all the forms have the same input IDs. I tried adding numbers to the form using php, so it would be something like "item_name1", "item_name2", "item_name3", etc depending on the form, but then I realized I don't know how to pass parameters into the jquery function.
Is there any way to do this? So that it's something like... $(function() { $(".submit1").click(function() { // Find parent form (which would have the ID "1", "2", "3", etc.) // var id = parent form ID // Get info from "item_name1" if form "1" was submitted // Get info from "item_name2" if form "2" was submitted // Etc. var item_name = $("#item_name"+id).val(); var item_notes = $("#item_notes"+id).val(); var imgid = $("#imgid"+id).val(); var price = $("#item_price"+id).val(); // declare datastring // ajax return false; }); });
I have a form that allows for dynamic field creation. Basically, you click the + button, and an addition row of fields (2 text fields) are created. The area that is dynamically created is wrapped by a <div id>, within which is, and this might be bad practice so please feel free to mock me , another few nested div id's. It looks something like this:
Code:
Each time you hit the +, it creates a new div id beneath the "Adds" id.
What I'd like to do is see the values of the id's "row_fqdn" and "row_ip". Is there a quick way to access the values of nested id's?
I found a workaround but it seems pretty messy and drawn out, something like this:
I have a situation where I need to populate form fields by grabbing information from a database when the user enters information in a specific field. I got this to work with a single field just to make sure I had the basics in place:
* User fills out "Field A" onchange event triggers Javascript function that uses Ajax to search and retrieve info from database (PHP/MySQL) Javascript function autofills "Field B" with Ajax response
Works perfectly. My trouble is that I need to do this with a whole series of fields at once, not just one. I tried using the PHP to output a Javascript array and then use the values from the array to populate the fields, but that didn't work. I got a message saying that my array was undefined. I'm not even sure this was the proper way to approach this, but it's all I could think of.
I have built search form that it retrieves information from database. for ex: when i click axtar (search) button it retrieves normally but when i click ENTER button via keyboard instead of axtar (search) button but it only displays results with white blank page
I will have 1 html page which uses javascript it will validate the form so the information inputed is correct...then on submit it will load another page with form ect...however the second page depends on what was selected on the first page say a gender radiobutton was on the first page and they selected male then on the second page a male figure/picture would be displayed...now I can do this all on 1 page however when trying to do it on 2 different pages the second page can't read whats going on/has happened on the first page...
I'm trying to populate a form with information from a database based on a textbox entry. However, when I begin to key in the textbox I receive "undefined" in each textbox throughout the form.
Take a look at my code for any errors? It also appears that my $_GET['jobid'] is not working properly.
i am developing a web application in which i have to retrieve the user browser and platform information. i am using javascript to get this information and tryin to pass these values to the html hidden form element. pasting a brief code from my application.
In the head I have: <link type="text/css" rel="stylesheet" href="myfirst.css"> <script src="myfirst.js" type="text/javascript"></script>
I have the following in 'myfirst.js' file: var writastring ="<table width="250" border="2"><tr> <td>Here is my first script text</td></tr></table>"
I have the following in the myfirst.css: #ontheleft{position:absolute; left:10px; top:50px; }
In the body of the HTML file directly below the body tag is this: <div id="ontheleft"> <script language="javascript"> document.write(writastring) </script> </div>
My problem is that it writes.......Fanfare........exactly nothing.. nada.
And yes they are all in the same path. Even if I change to this: var writastring="OK! Write this" nothing is written. Even leaving out the Div tags nothing changes.
The purpose of this exercise is to assemble content in the JS file and then write it in any number of pages.