-
Posts
3,671 -
Joined
-
Last visited
-
Days Won
17
Content Type
Profiles
Forums
Events
Everything posted by niche
-
I'd use the onload event and add to the counter each time a page loads. I 'd want to save the data in a table so I'd do an AJAX call too.
-
php var into js var and back SOLVED with thanks in the final post.
niche replied to niche's topic in JavaScript
"I see", said the blind man. That's a nice satisfying conclusion to a light informative topic. Thank you So Called, Ingolme, and CodeName. -
php var into js var and back SOLVED with thanks in the final post.
niche replied to niche's topic in JavaScript
I think I understand except I wasn't able to get the function to work, with it in the head. I had to move it to the end of the script. Is that why the alert doesn't activate from the previous post? -
php var into js var and back SOLVED with thanks in the final post.
niche replied to niche's topic in JavaScript
Added the quotes and moved the JS to the end of the script. I suppose that demos how JS executes. I didn't think the JS executed until the onclick, but apparently it does right? -
php var into js var and back SOLVED with thanks in the final post.
niche replied to niche's topic in JavaScript
Thanks, but no go. What do you think? Current Script: <html><head><script type="text/javascript">function displayText() { var hello = <?php echo $php_var; ?> alert(hello);}</script></head><body><?php $php_var = "Hello World!"; ?><button onclick="displayText()">Display</button></body></html> -
The class is the styling. Find the "textarea" class in your CSS file and change it to what you need. EDIT:If you want styling for a specific item, create a new class and assign it to that item.
-
Please read this then let us know what you need. http://www.w3schools...body_onload.asp
-
Also, your VALUE statement in the query isn't concatenated.
-
It worked. I forgot to change the id reference in the JS. Thanks to CodeName and ShadowMage for their help.
-
Yes. Thanks. How did you know where to use that ref that way?
-
I may not be following you. Are you saying is how to define the style for all IDs beginning with: itemInfo? <style type="text/css">[id^=itemInfo] { position:absolute; background-color: yellow; width: 300px; height: 50px; margin: 0px 0px 0px 105px;}</style>
-
That's the way to define the ID selector?
-
What's the notation for the CSS for all the IDs the begin with: itemInfo? #itemInfo???? Can it work that way?
-
Need to remove hidden div from the flow SOLVED with thanks in the last post
niche replied to niche's topic in JavaScript
I see it. I needed to close the div. I also changed the position to absolute. On to the next issue. Thanks for keeping me on track ShadowMage! -
I just discovered that hover doesn't work on my mobile device. So, I'm trying to create a similar effect with JS. My problem is I can't get my hidden div out of the flow. I load my page like this and the hidden div disrupts all the placement around the button when it appears. What to do? echo '<button class="button0" onclick="showDiv(this.value)" value="xyz">Item Info</button>';echo '<div id="linkContainer2" style="display:none;"></div>'; CSS:#linkContainer2 { background-color: yellow; width: 300px; height: 50px; margin: 0px 0px 0px 105px;}
-
Passing Multiple Form Arguments to a Function - Live Search
niche replied to jnorman's topic in HTML/XHTML
Since you're using the W3schools script as the base, how are you sending the request to your php script?- 3 replies
-
- arguments
- parameters
-
(and 6 more)
Tagged with:
-
Making a div appear and disappear SOLVED with thanks in the last post
niche replied to niche's topic in JavaScript
Both of us get to do better now that we know better! -
Making a div appear and disappear SOLVED with thanks in the last post
niche replied to niche's topic in JavaScript
That was it. For everything there is a first time. I didn't have that distinction in my head until now. Thanks again dsonesuk and for your effort So Called. Also, I appreciate your comment justsomeguy. That probably wouldn't have occurred to me. -
This makes my div appear (when the display attribute is set to none) using the onclick event: divTest = document.getElementById('linkContainer2');if (divTest.style.display === "none") { divTest.style.display = '';} I thought this would make it appear and disappear (depending on the display attribute) using the onclick event, but it doesn't. Why? divTest = document.getElementById('linkContainer2');if (divTest.style.display === "none") { divTest.style.display = ''; } elseif (divTest.style.display === "") { divTest.style.display = "none"; }
-
http://www.w3schools.com/sql/sql_join.asp
-
Lots of good advice. Thank-you for your help Don E, Ingolme, and eTianbun. Sorry it took so long to thank you. I was out for a couple days.
-
How do you create an id for an element? I successfully created a paragraph with: var newLink = document.createElement('p'); //create paragraph and tried (unsuccessfully) to create an id with: newlink.setAttribute('id', 'noSug'); What's the right way?
-
Thanks Ingolme. Your help is always appreciated.
-
is there a function to delete dupes in a comma delimited string? If so, what is it please? if not, is an implode/explode with an array_unique() as good a way as any?