I'm extending the number of rows of a table by cloning the last row (=newLastRow). Each row has a single input tag in it, with a name which includes the row number and an onclick function call which passes the row number to the function:<input type='text' class='clickable' name='inp8.1' size='20' value='xyx' onclick='toggle("table8");'>The new cloned row has an input tag with the same parameter value as the cloned one, obviously. I need to increment this: name='inp9.1', 'toggle("table9")'.y question is simple but I'm just starting with DOM: how do I refer to the input tag in the newLastRow so I can change these values?
I have tested this in IE 8 and doesn't set $_FILES['sigImg']['name'] and $_FILES['sigImg']['tmp_name'] to anything. I don't want the value of the file input, since this will be different depending on the browser. And in IE 8, you'll need to have some settings enabled to be able to get the full path, otherwise will return "fakepath".
I've been searching this forum, Google Groups, and Stack Overflow this morning but I haven't been able to quite find a simple way to clone a LI element (that contains form inputs with data,) and erase the newly created/cloned LI's form inputs.
The function I'm using at the moment looks like this:
I need to change dynamically how a class is displayed, my site (with out going into detail) interprets saved info from the user (its saved through perl) in a *.js file, then views it through template *.htm files drawing on js files after loading.
The thing is I need to allow for several settings like font type size and color, (things that could be held in style sheets) but then save in their js file a number representing this and load it when the template page is opened.
I have two possibilities to answer this
1, instead of using classes I could use Ids - but using 1 id for what could (hypothetically) be an endless string of elements seems real messy, I don't even know if it would work.
2, I read somewhere I could dynamically generate style tags with the classes defined, but I can't find where I read this..
OK, been banging my head with this for a while. I have a dynamic sitewhere we get a list of elements from the database, we identify theseitems with id numbers and encoded get strings. So I'm trying to getstyle changes to take affect with jquery and it really just doesn'twork.I'm not sure what I'm doing wrong. Here is the source code:
I regularly use a snippet of code that pops up a small window to display an image or a very small html file.Using the window.open() function, I'm able to disable scrolling, resizing, etc., and size it to my needs. I'll have a window.close link somewhere on the page. But in my current project, my customer's page has several links related to other companies. When you click on the link, an that company's ad pops up in a small window. At this point, the viewer can simply close the window, or they should be able to click on the ad and be taken to that company's website.
I'm able to have it close the window and open that new url in the parent browser window, but my website customer doesn't want their site to go away. They want the new company's website in a new window.
Or I can simply NOT close the popup window, but now the new company's website is in a relatively small browser window, unable to scroll, resize, etc. Is there a way for me to somehow modify an existing window with an onclick directive - something similar to the window.open() function, OR open a new browser window with window.open() AND close the popup window? If I haven't made myself clear, let me know and I'll try to explain myself better.
I'm currently in the process of making a spreadsheet like webpage and it all working fine... However I have been using setAttribute and removeAttribute in order to dynamically change a table cells onclick property.
This of course does not work in IE7 etc and I've been banging my head against a brick wall trying to come up with a solution that will work in all browsers but I just can't seem to get it to work with using methods such as...
I get all sorts of not implemented, type mismatch errors when I try to use the above.
I am trying to dynamically clear the value of a form input field and then submit the form.When I used $('#my_field').val('') to clear the field, it was cleared on the screen but when the form was submitted the original value of the input field was posted.My browser is FireFox and I can see using FireBug that when the field is cleared, firebug is still showing the html code with the old value. E.G. <input type="text" value="old_value" />The same situation occurred if I used $('#my_field').attr('value', '') to clear the field.The same situation occurred if I actually changed the value of the field rather than just clearing it.To work around this problem I ended up using the $('#my_field').removeAttr('value') to clear the field before it was submitted.
So I have to ask some stupid questions and make sure that there is not something wrong in this simple syntax. I am trying to get input field attributes type and tagname by field ID. Heres the code..
When I look in firebug I see there is the correct ID in input_id variable and that the input field with that id exists. But for tag and type variables I just get 'undefined' for reason unknown.. syntax is correct or?
How do I change the value of "id" of a text input field?I am using the function attr (), but it seems every time I call the function adds an id.$ ("input.buscaf.") attr ('id', obj);"obj" is the value of the id which will be exchanged.I have to change the value of the id because I'm using masks values.
I have a table with a list of items which currently show 8 items per page. I want to have an input box at the top of the page so if I want a different amount of items to be shown i enter the number and the page alters the pagination to what ever number is entered.
I would like to change the value of a single hidden input onclick. The possible values are text, email and URL.I've tried all kinds of "ways" (inline and in function in a variety of ways,) but nothing. I stripped it down one last time to give it another go, but realize I'm out of ideas, so the code below is simply where I've thrown in the towel.Can someone make this work with a JS function, so that each link may be clicked and change the hidden input's value to the respective value?
I have some inputs with images that I'm changing the source for onmouseover and onfocus. I want to move the js from the HTML and use a script that does the same thing for all instances of the buttons throughout the site (there's only two at the moment). So far I've got this:
That doesn't look very lean and it works erratically. On a page where both buttons exist, it works in Firefox but only one of the buttons works in IE (the second one) and in Firefox the script won't work if the first button is not present on the page. So what would be the best way to do it?
Could somebody confirm if and how I can change the TYPE of a textbox from PASSWORD to TEXT depending on whether a user checks a checkbox.
In essence I have a login and password form and the end user wants the option to check a checkbox to make the Password textbox show normal text rather than the asterisks. If the checkbox is unchecked then it shows the asterisks when entering the password.
How on earth do you use javacript to change the text color of an input element, and have it work with IE??? I've tried numerous solutions. All of them work on browsers such as Mozilla. But none of them work on IE.
This works in every browser I've tried besides IE: