![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
nogray
-
Posts
930 -
Joined
-
Last visited
Posts posted by nogray
-
-
You can alter the id values for the divs to include the input name as a substring and use the this.id in the input click event.
e.g.
<div id="radio1"> <input type='radio' name='name' id='radioci1' value='yes' onclick="reveal(this.name)" ><label for='radioci1' class='yes'>Yes</label> <input type='radio' name='name' id='radioci2' value='no' onclick="hide(this.name)" ><label for='radioci2' class='no'>No</label> </div> <div id="dynamic_name" ><input type="text" name="textfield" value="" /></div> function reveal(id) { document.getElementById('dynamic_'+id).style.display="block"; }.....
-
for is a reserverd word, use something else (e.g. forwhom)
-
You can simply generate a random number and add it to url query, for example
window.location = my_url.php?random_number=1234455666
-
you should add the wrap attribute to your textarea
<textarea wrap="off"></textarea>
-
You should set the width for box2 as well, otherwise it'll expand to fit the content.
-
The template you are using has the following
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
change the charset to utf8 and you should be fine.
-
If your site breaks when zooming, it might break when the window size is small. Try to resize the browser window and see if the design holds up.
If you want pixel perfect design, you would need to set the widht and height of each div and set the overflow property to either hidden or auto (auto will add scroll bars if there is too much content).
-
You should review the Acrobat JavaScript Scripting Reference at http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/javascript/AcroJS.pdf
In Page 507, you'll find the following example,
// get the printParams object of the default printer var pp = this.getPrintParams(); // set some properties pp.interactive = pp.constants.interactionLevel.automatic; pp.colorOverride = pp.colorOverrides.mono; // print this.print(pp);
You would need to review the document for details though.
-
Hide or show a div (or any other object)
<div id="my_div1">some text</div> <script> // hide document.getElementById('my_div1').style.display = 'none'; // show document.getElementById('my_div1').style.display = ''; </script>
-
You can add on onkeypress event that will check the length of the input value and focus to the next field. You can review the example below (make sure to use the right id)
<input type="text" onkeypress="if (this.value.length >= 5) document.getElementById('next_field').focus();" /> <input type="text" id="next_field" />
-
Hi dsaba,
can you let me know what page you tried it on? It could be a CSS issue or something simialr.
Thanks
Sam
-
In you main page you'll need to add a function to add an option to the select
i.e.
function add_option(val, txt){ var opt = document.createElement("option"); opt.value = val; opt.txt = txt; document.getElementById('MY_SELECT_ID').appendChild(opt); document.getElementById('MY_SELECT_ID').selectedIndex = document.getElementById('MY_SELECT_ID').options.length - 1; }
Not Tested
In the opened window, you'll need to call this function with the text and value;
i.e. you're using a link
<a href="#" onclick="window.opener.add_option('some value', 'some text'); window.close();">Select Me</a>
Again Not Tested.
-
form name or id can't start with a number, change it to id='frm_".$id."'
-
make country global variable
var country=0;
function showResult(str){
if(str=="1"){country=1;}
......
-
I assume you are using this for a tooltip, since each object (html element) will have it's own tip, you can simple keep the string value inside the function () (like the wrong string) for each object.
Second option is to use the title attribute in the HTML element and use the "this" scope in your function to get the title
for example
HTML... <input type="text" title="Hello World" id="input_1" /> Script... document.getElementById('input_1').onmouseover = function(e){ showTip(e, this.title); };
Not Tested
-
use parseInt()
price = parseInt(document.getElementById('price').value, 10);
this will make sure the input is converted into an integer
-
Set the width of the table to a percentage (like width="100%")
This should help a bit unless some of your cells have a very wide text or you have too many cells. In that case, you might need to rethink the table structure for printing.
-
that's why the if statment is there
if you getting an error with if statment try to change it to
if ((typeof Sizes.length) != "undefined"){
.....
-
You can try a small if statment to check if Sizes is an array
if (Sizes.length){
for loop
}
else {
single element
}
-
obj.onmouseover = function(){showTooltip('Some random text.');};
-
-
-
You'll need to add an iframe shim behind your menu. Just search for "iframe shim" and you'll find some pre-made scripts out there.
-
try this, JSON[0]['grade']
Positioning kills me
in CSS Help
Posted
Either add a line break "<br />" after "Magnolia Field" or put it inside a div with the style "clear:both"