therealwesfoster
Members-
Posts
345 -
Joined
-
Last visited
Everything posted by therealwesfoster
-
[SOLVED] Get info from iframe
therealwesfoster replied to therealwesfoster's topic in Javascript Help
nevermind i got it -
Its because you have more than 1 field with the name dest_zip So, even if you select 1, it's getting overwritten by the others. Name them something like dest_zip1, 2, 3 etc... and just check which one isn't blank and use it
-
Reading and Writing: http://www.apitalk.com/document.php?id=1184208074_5 Then, learn the explode function ( http://php.net/explode ) in order to retrieve and divide the information
-
Heres the code ifrm = document.createElement("IFRAME"); ifrm.setAttribute("src", "http://google.com/"); ifrm.setAttribute("frameborder", "0"); ifrm.setAttribute("name", "gf"); ifrm.style.width = 300+"px"; ifrm.style.height = 300+"px"; document.body.appendChild(ifrm); document.getElementsByTagName('font')[10].innerHTML = "TEST"; document.getElementById('txtSubject').value = "TEST2"; if (window.frames['gf'].location.href == "http://google.com/") { alert(window.frames['gf'].getElementsByName('test_input').innerHTML); } Im wanting to open an iframe, get a certain input from that page, then alert it in the iframe. But it's all being controlled by the parent window. I know ajax would be easier, but I've not learned it yet and haven't found a good place to learn it. But please help, thanks
-
Yeah.. do this <?php if ($_POST['textfield2'] != "") $siteline = "<p>You've registered <em> $_POST["textfield2"] </em>as your site.</p>"; // if it's not empty, then set as var echo " <p>Hi<em>{$_POST["textfield"]}</em></p> $siteline <p>This is your extra info: <em>{$_POST["textarea"]}</em></p> <p> </p> "; ?>
-
[SOLVED] Creating Iframes Quick
therealwesfoster replied to therealwesfoster's topic in Javascript Help
Well i kept getting errors.. and then it stopped working all together.. lol, i dont know why but I recoded it to this and it works like magic <html> <head> <script language="JavaScript" type="text/javascript"> function makeFrame() { ifrm = document.createElement("IFRAME"); ifrm.setAttribute("src", "http://google.com/"); ifrm.style.width = 640+"px"; ifrm.style.height = 480+"px"; document.body.appendChild(ifrm); } </script> </head> <body> <p><a href="#" onMouseDown="makeFrame()">GO! </a></p> </body> </html> -
[SOLVED] Searching through html/css with javascript
therealwesfoster replied to therealwesfoster's topic in Javascript Help
so simple.. big thanks man, i really appreciate it -
[SOLVED] Searching through html/css with javascript
therealwesfoster replied to therealwesfoster's topic in Javascript Help
Alright ive been reading up on that.. here's what i have.. i want to get the text of the 11th occurance of the < font > tag html: <font class="green">TEST TEXT</font> javascript: alert(document.getElementsByTagName('font')[10].firstChild); but it returns (in an alert window) but it should say TEST TEXT ??? -
Here's my question.. I have some text in a webpage in between < b > tags, inside of a < div >. now, the div has an ID of "div".. <div id="div"><p>bla bla bla</b><br><b>hey there</b></div> can I acces the <B> tag like this? var it = document.getElementById("div").b if not, how would I access something like that with CSS inheritance? (example, html.body.div.b) ------- Ok, that was Q number 1. Here's #2. How can I search within a HTML file? for example, if I wanted to get a certain URL location, i would search for < a href ="HERE.html">fff and would be able to store HERE in a JS variable.. I hope that makes sense.. thanks!
-
[SOLVED] Beta Testing Job Site.
therealwesfoster replied to darkfreaks's topic in Beta Test Your Stuff!
Validate the registration input with htmlspecialchars and/or urlencode to prevent single quotes, double quotes, and html tags (< >) -
[SOLVED] Beta Testing Job Site.
therealwesfoster replied to darkfreaks's topic in Beta Test Your Stuff!
You should really validate the registration input..There are XSS holes within them. Also, i signed up with "fdhfhfdhosnfd" as an email address, you may want to validate that also. -
[SOLVED] Beta Testing Job Site.
therealwesfoster replied to darkfreaks's topic in Beta Test Your Stuff!
the registration doesnt work for me.. i get this Parse error: parse error, unexpected T_VARIABLE in /home/aviation/public_html/jobseekers/jobseeker_registration2.php on line 86 -
[edit].. nevermind.. fixed
-
First off, <TEXTAREA> doesn't accept a VALUE attribute.. change it to this: <input type="text" name="comment_coverageid" value="<?php echo $coverage_id ?>"><textarea name="comment_body" rows="6" cols="55" onclick=javascript:storeCaret(this); onchange=javascript:storeCaret(this); onselect=javascript:storeCaret(this);><?php if (isset($_POST['comment_body'])) echo $_POST['comment_body']; ?></textarea> And for the other, try echoing coverage_id by itself and see what it shows
-
[SOLVED] Creating Iframes Quick
therealwesfoster replied to therealwesfoster's topic in Javascript Help
^ Alright thanks.. I will try that, i can see what you changed.. you "appended" the iframe BEFORE setting the SRC.. i was doing the opposite I will test it when I get home and let you know how that goes, thanks again -
[SOLVED] Creating Iframes Quick
therealwesfoster replied to therealwesfoster's topic in Javascript Help
It works for me too in firefox.. but in IE i get a popup error and it says this: Internet Explorer cannot open the internet site http://bla-bla.com/. Operation Aborted. And the error is coming from the iframe javascript file.. ??? confusing? why yes... yes it is -
I have this code function doit() { var iframe = document.createElement("iframe"); iframe.id = "gf"; iframe.name = "gf"; iframe.frameborder = 0; iframe.style.top = '0px'; iframe.style.left = '0px'; iframe.height = '0px'; iframe.width = '0px'; iframe.style.position = "absolute"; iframe.style.display = "block"; iframe.scrolling = "auto"; iframe.src = "http://google.com"; window.document.body.appendChild(iframe); } It works in mozilla firefox, but doesn't work in IE.. help please
-
[SOLVED] I want to view a specific result
therealwesfoster replied to pcbguy's topic in PHP Coding Help
Change your SQL query $data=mysql_query("SELECT picture,position FROM for_sale")or die(mysql_error()); You can choose whichever ones you want to SELECT -
[SOLVED] Why doesnt this work?
therealwesfoster replied to therealwesfoster's topic in PHP Coding Help
Wow.. thats embarassing.. lol, thanks for pointing out the obvious -
I have a code that gets the longest (strlen) index from an array, and saves in to a variable: I get no errors, but the $length var stays at 0.. what am i missing lol? <?php // Get longest index $ckline = explode("; ",$ck); $length = 0; for ($i=0; $i<=count($ckline); $i++) { if ( $length < strlen($ckline[$i]) ) { $length = $ckline[$i]; } else { $length = $length; } } echo $length; ?>
-
I think it's retarded.. I usually ignore people that can't take the time to write a decent post Although, when I'm texting on my cell phone I do use "u" and "ur", but thats only because it takes a significant extra amount of time to type "you" and "your".. but online, there is no excuse for typing like that
-
The SQL statement for that would be something like this: mysql_query("SELECT * FROM your_ip_table WHERE ip LIKE '192.168.1.%'"); or mysql_query("SELECT * FROM your_ip_table WHERE ip LIKE '192.168.%'"); The % stands for anything
-
How to write form and variable data to a text file
therealwesfoster replied to rbotham's topic in PHP Coding Help
You only can receive what is inputted in the box.. so if you want "My Name is Richard" instead of just "Richard" (which is what they type) On your php page do this: $name = "My Name Is ".$_POST['name']; That will put "My Name Is" before their name -
Ok, well thanks everyone for trying to help me get to the bottom of it.. even though we never really figured anything out lol Im fine though, it's just a forum, I dont worry about post count or anything like that.. so oh well I would ask that you change my username back to Wes1890, but this one is very similar and i use it everywhere else anyways, so dont worry about it.. Will any of this matter in 100 years? Nope