Jump to content

ag3nt42

Members
  • Posts

    427
  • Joined

  • Last visited

    Never

Everything posted by ag3nt42

  1. i'm running a script where I find the need to check wether or not an input has focus i've tried if(document.getElementById('element').focus()) { alert('This Element Has Focus!') } but i'm getting errors any help is much appreciated.. thanks ag3nt42
  2. well the same still applies.. only difference is you might be able to use _POST but _GET will work just fine.
  3. i don't know how you will get the address to JS from your flash but.. basically i guess you could use the $_GET method and attach ?link=address then in php say if(isset($_GET['link'])) { $link=$_GET['link']; } //then to put it in the JS <?php echo(" <script> window.open.location.href=' ".$link." '; </script> "); ?> something like that..
  4. ic.. ok.. well you'll need to you javascript for that I blieve.. you'll need to pick up that address returned by the search and use js to auto open a window.. to that address (Lunch Time-whoowhoo)brb1hr
  5. when i did a search only one search result was returned.. out of 2 possible
  6. sure that would be kwl
  7. well SQL databases and php are capable of handling quite big load of data.. granted I don't know the full situation but if I were to attempt such a think I would load everything up into the SQL database. and use php for searches and listings I have a webapp right now that uses php and sql to compeletly build an entire scheduling system. I would consider this a small-med webapp and it already handles about 10-25 querys per task. thats quite a bit of information hell a better example is this very forum.. if this forum can handle this many ppl plus posting and retrieving all these posts.. i'm sure it can hanlde a few classified ads Matter of fact I used to work at a newspaper relatively big one.. and we used a php webapplication for the entire website.. to post stories and ads and what not.. that site generated about 700k hits month ps to make things easier you could build a small app to fill your database for you. and use the XML files to pull the info in and submit to the database. essentially using php to read the XML and distrubute its values across query's to be submitted to the database.
  8. i've never used this but.. this may help.. http://us.php.net/manual/en/ldap.setup.php
  9. oops that code is for the NEXT and previous buttons this below is what you should change: $body .= " <h3><a href=\"$page_result->url\">" . (($page_result->title) ? $page_result->title : $page_result->url) . "</a></h3>\n" . changed: $body .= " <h3><a target='_blank' href=\"$page_result->url\">" . (($page_result->title) ? $page_result->title : $page_result->url) . "</a></h3>\n" . as far as only one result try playing with this value $search_flex = 1; keep incrementing until only one result gets returned did you purchase this script?
  10. in order to get your script to open in new window change this line $navigation .= " <a href=\"" . htmlentities(preg_replace('/&p=\d*/','',$_SERVER['REQUEST_URI'])) . "&p=$i\">$i</a> \n"; to this $navigation .= " <a href=\"" . htmlentities(preg_replace('/&p=\d*/','',$_SERVER['REQUEST_URI'])) . "&p=$i\" target='_blank'>$i</a> \n"; notice i've add a 'target' attribute to the link..with the value of '_blank' this tells the browser that we want this open on a new window.
  11. i got it working with my code.. I like yours its shorter.. but i'll just keep what i've got since it is working.. yea I feel you on the whole center thing but i'll conform to standards once they actually come up with some.. I find it halrious that it takes hacking most of the time to get code to work along with validation.. so until they all conform to a standard... I'll keep using deprecated code and hacks. thanks for helping Nightslyr , ag3nt42
  12. well i think the for loop might be alil much so i've taken that out.. that seems to have kept IE from crashing but I'm still only getting it to switch.. one time.. whats the deal with that? the logic says.. onload (after 5 secs) run the function x=0 so switch the first image increment x then after 5 secs run the fucntion again. but it never runs again....??? here is the updated code: <script type='text/javascript'> // SETUP VARIABLES var path = mysite.com/imgs/'; var picture = new Array( 'img1.jpg', 'img2.jpg', 'img3.jpg', 'img4.jpg', 'img5.jpg', 'img6.jpg', 'img7.jpg', 'img8.jpg', 'img9.jpg', 'img10.jpg', 'img11.jpg', 'img12.jpg' ); x=0; function rotatePics() { if(x==0) { if(document.getElementById('rotator').src==path+picture[0]) { document.getElementById('rotator').src=path+picture[1]; } } if(x==1) { if(document.getElementById('rotator').src==path+picture[1]) { document.getElementById('rotator').src=path+picture[2]; } } if(x==2) { if(document.getElementById('rotator').src==path+picture[2]) { document.getElementById('rotator').src=path+picture[3]; } } if(x==3) { if(document.getElementById('rotator').src==path+picture[3]) { document.getElementById('rotator').src=path+picture[4]; } } if(x==4) { if(document.getElementById('rotator').src==path+picture[4]) { document.getElementById('rotator').src=path+picture[5]; } } if(x==5) { if(document.getElementById('rotator').src==path+picture[5]) { document.getElementById('rotator').src=path+picture[6]; } } if(x==6) { if(document.getElementById('rotator').src==path+picture[6]) { document.getElementById('rotator').src=path+picture[7]; } } if(x==7) { if(document.getElementById('rotator').src==path+picture[7]) { document.getElementById('rotator').src=path+picture[8]; } } if(x== { if(document.getElementById('rotator').src==path+picture[8]) { document.getElementById('rotator').src=path+picture[9]; } } if(x==9) { if(document.getElementById('rotator').src==path+picture[9]) { document.getElementById('rotator').src=path+picture[10]; } } if(x==10) { if(document.getElementById('rotator').src==path+picture[10]) { document.getElementById('rotator').src=path+picture[11]; } } if(x==11) { if(document.getElementById('rotator').src==path+picture[11]) { document.getElementById('rotator').src=path+picture[0]; x=0; } } x+1; setTimeout('rotatePics()',5000); } </script> <center> <img src='imgs/img1.jpg' id='rotator' onload='setTimeout(\"rotatePics()\",5000);' /> </center>
  13. here is the code for it <script type='text/javascript'> // SETUP VARIABLES var path = mysite.com/imgs/'; var picture = new Array( 'img1.jpg', 'img2.jpg', 'img3.jpg', 'img4.jpg', 'img5.jpg', 'img6.jpg', 'img7.jpg', 'img8.jpg', 'img9.jpg', 'img10.jpg', 'img11.jpg', 'img12.jpg' ); x=0; function rotatePics() { for(x=0;x<=11;x+1) { if(x==0) { if(document.getElementById('rotator').src==path+picture[0]) { document.getElementById('rotator').src=path+picture[1]; } } if(x==1) { if(document.getElementById('rotator').src==path+picture[1]) { document.getElementById('rotator').src=path+picture[2]; } } if(x==2) { if(document.getElementById('rotator').src==path+picture[2]) { document.getElementById('rotator').src=path+picture[3]; } } if(x==3) { if(document.getElementById('rotator').src==path+picture[3]) { document.getElementById('rotator').src=path+picture[4]; } } if(x==4) { if(document.getElementById('rotator').src==path+picture[4]) { document.getElementById('rotator').src=path+picture[5]; } } if(x==5) { if(document.getElementById('rotator').src==path+picture[5]) { document.getElementById('rotator').src=path+picture[6]; } } if(x==6) { if(document.getElementById('rotator').src==path+picture[6]) { document.getElementById('rotator').src=path+picture[7]; } } if(x==7) { if(document.getElementById('rotator').src==path+picture[7]) { document.getElementById('rotator').src=path+picture[8]; } } if(x== { if(document.getElementById('rotator').src==path+picture[8]) { document.getElementById('rotator').src=path+picture[9]; } } if(x==9) { if(document.getElementById('rotator').src==path+picture[9]) { document.getElementById('rotator').src=path+picture[10]; } } if(x==10) { if(document.getElementById('rotator').src==path+picture[10]) { document.getElementById('rotator').src=path+picture[11]; } } if(x==11) { if(document.getElementById('rotator').src==path+picture[11]) { document.getElementById('rotator').src=path+picture[0]; x=0; } } setTimeout('rotatePics()',5000); } } </script> <center> <img src='imgs/img1.jpg' id='rotator' onload='rotatePics();' /> </center> last time i tried this code it crashed my IE7.. this code is just sposed to do a simple image swap based on which image is up.. and and have a 5 sec interval bewtween switches.. .but I've been working at this for somtime now and I can't seem to get it to work correcly.. I've gotten the imgs to swap.. but it will only swap like one time..
  14. huh.. I don't see where you are outputting the name could you isolate that code plz?
  15. well its working now.. thanks man.. haha.. atleast i wasn't too far off aye? hehe
  16. well that got name and phone working but organization won't work. hmm double checked the sp on them still don't work
  17. can anyone tell me why this function will not work... I keep getting error saying "I'm gay and object is required Your function won't work dumbarse" ///Thats gota be the most retarded error msg ever. please help!, thanks <script type='text/javascript'> function checkName(object) { if(object=='Name') { if(document.getElementById('urnmae').value=='') { alert('You must enter a name!'); document.getElementById('urname').focus(); } } if(object=='Organization') { if(document.getElementById('organization').value='') { alert('You must enter an organization name!'); document.getElementById('organization').focus(); } } if(object=='Phone') { if(document.getElementById('phone').value=='') { alert('You must enter a phone number!') document.getElementById('phone').focus(); } } } </script> on my input forms im passing object like so: <input type='text' name='urname' onblur='checkName("Name")' />
  18. interesting..so in order to be able to authenticate yourself through smtp you have to download a phpmailer?
  19. did you use smtp.SERVERIP.com/net/org ? or just SERVERIP for the smtp loc? @JD* I've never seen anything about having to use authentication.. how and where would you set that up?
  20. ok so your going to set up your sessions and stylesheets in your header.php since that should be carried across all the pages.. create a selection box containg a list of all the different style sheets you have.. your html form for users selection: <?php //INTIALIZE VARIABLES $S_checked1=''; $S_checked2=''; $S_checked3=''; $S_checked4=''; echo(" <select name='style'> <option ".$S_checked1." value='style1.css'>Style 1</option> <option ".$S_checked2." value='style2.css'>Style 2</option> <option ".$S_checked3." value='style3.css'>Style 3</option> <option ".$S_checked4." value='style4.css'>Style 4</option> </select> "); ?> the php to process it: <?php //First COLLECT THE POST INFO if(!(isset($_POST['style']))) { $STYLE='';// IS NOT SET SO STYLE EQUALS NOTHING (or default style) } else { $STYLE=$_POST['style']; // IS SET SO STYLE EQUALS USERS CHOICE } echo("<link rel='stylesheet' type='text/css' src=' " . $STYLE . " ' "); //NOW WE RUN ANOTHER CHECK TO SEE WHICH ONE USER PICKED AND CHECK IT ON THE SELECTION DROP DOWN switch ($STYLE){ case "style1.css": $S_checked1="CHECKED"; break; case "style2.css": $S_checked2="CHECKED"; break; case "style3.css": $S_checked3="CHECKED"; break; case "style4.css": $S_checked4="CHECKED"; break; } ?>
  21. change this line to this so we can see some error codes <?php echo "Cannot send password to your e-mail address<br>"; ?> to this: <?php echo("Cannot send password to your e-mail address<br>" . mssql_get_last_message ()); ?> [code] [/code]
  22. even if there was something wrong with your mail server.. php would not be able to recognize it.. so the script would still finish successfully
  23. what errors are you getting.. can you post them plz?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.