Jump to content

MrAdam

Members
  • Posts

    489
  • Joined

  • Last visited

Everything posted by MrAdam

  1. MrAdam

    Shopping cart (asp)

    ahh i see, just i'm setting up a website for a friend who runs his own business, i'm going to be creating my own shopping cart and i was just wondering about the different ways of accepting payment.
  2. YAYER! it finally works! thankyou all guys!
  3. MrAdam

    Shopping cart (asp)

    could i just add, how do you go about "checkout" .. paypal? (or something similar)
  4. yayer! one step closer! now part of it pops up since i added event (thankyou chocolate570!) but it is onlypart of it. looks like some kind of HTML error?updated link: http://www.newbiestyle.co.uk/lib/popups/email/-Thanks for your help guys!
  5. im not too sure on this, but i don't think you can upload files with javascript, you'd need to use a server side programming languge, like PHP and ASP.... and to upload and have a progress bar, i think, you'd need to use ASP.... try posting that again in the ASP forum ...
  6. still fails :Sit's not displaying the email box at all, so it's not a problem (yet) with the AJAX.
  7. MrAdam

    HELP ME

    erm.. http://www.w3schools.com/js
  8. perhaps .. var rw1 = document.calc.rw1.value; should it be: var rw1 = document.calc.width.value; ??
  9. MrAdam

    Pls help me

    don't know if this is any help .. but .. http://jennifermadden.com/javascript/arraySimple2.html
  10. it works for me? (im using IE)
  11. the finished result of what i've been needing help with over the past few days: http://www.newbiestyle.co.uk/lib/popups/email/(for anyone that cares)
  12. ahh, i've found the problem... var xmlHttp = GetXmlHttpObject();
  13. hi all, trying to create a little pop up that sends an email. i have the popup working fine, but the AJAX to open "sendemail.php" isn't working.here's my script: var xmlHttp;function sendEmail() { var eName = document.getElementById('eName').value; var eEmail = document.getElementById('eEmail').value; var eMessage = document.getElementById('eMessage').value; var xmlHttp = GetXmlHttpObject(); if (xmlHttp == null) { alert ("Sorry, your browser does not support HTTP requests. To use this feature please download a newer web browser. For now please use the contact page.") return; } var url = "sendemail.php"; url = url + "?eName=" + eName; url = url + "&eEmail=" + eEmail; url = url + "&eMessage=" + eMessage; url = url + "&sid=" + Math.random(); xmlHttp.onreadystatechange = updatePopUp; xmlHttp.open("GET",url,true); xmlHttp.send(null);}function updatePopUp() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById('popup').innerHTML=xmlHttp.responseText; } } function GetXmlHttpObject() { var objXMLHttp=null; if (window.XMLHttpRequest) { objXMLHttp=new XMLHttpRequest(); } else if (window.ActiveXObject) { objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP"); } return objXMLHttp;} anyone know why it isn't working? Just says "Error" in the status bar...
  14. it's not? .. if my pop up was say 400px wide, and my res like 1024, it would be 824px from the left, definately not the middle. i would have thought it would be: '(screen.width - popupWidth) / 2' ??but i can't seem to get that to work...:: UPDATE :: var promptWidth = 400;var fromLeft = ((screen.width - promptWidth) / 2) - 21; .. done it
  15. this should work: <?php$random[0] = "blah blah";$random[1] = "blah blah";$random[2] = "blah blah";$random[3] = "blah blah";$random[4] = "blah blah";$selected = array_rand($random,1)print $selected;?>
  16. i've read somewhere that URLs like:yoursite.com/file.php?var=1&var=2can be converted into URLs like:yoursite.com/file.php/1/2or something similar, which i guess makes the search engines able to read them better or something. and i think in the PHP config you can change what files are parsed.
  17. have you already made the player, and just need to create the playlist?
  18. Send the page name to the function: <img src="...." onClick="loadText('Home');" /> then use a switch to load the correct text <script type="text/javascript">function loadText(page) { var HomeRight = "Home Page, Right Box Text!" var HomeLeft = "Home Page, Left Box Text!" var PowerLevellingRight = "Power Leveling Page, Right Box Text!" var PowerLevellingLeft = "Power Leveling Page, Left Box Text!" var GoldRight = "Gold Page, Right Box Text!" var GoldLeft = "Gold Page, Left Box Text!" var HonorLevelingRight = "Honor Leveling Page, Right Box Text!" var HonorLevelingLeft = "Honor Leveling Page, Left Box Text!" var AboutUsRight = "About Us Page, Right Box Text!" var AboutUsLeft = "About Us Page, Left Box Text!" var RentAnAccountRight = "Rent An Account Page, Right Box Text!" var RentAnAccountLeft = "Rent An Account Page, Left Box Text!" var JoinUsRight = "Join Us Page, Left Box Text!" var JoinUsLeft = "Join Us Page, Right Box Text!" var left = document.getElementById('leftbox'); var right = document.getElementById('rightbox'); switch (page) { case 'Home': left.innerHTML = HomeLeft; right.innerHTML = HomeRight; break; case 'PowerLevelling': left.innerHTML = PowerLevellingLeft; right.innerHTML = PowerLevellingRight; break; default: left.innerHTML = ''; right.innerHTML = ''; break; }}</script> - you'll need to finish off the switch, i only added 2 of them.
  19. Hi im trying to create a kind of pop up, much like the "My Assistant" menu on this forum. A can create the menu itself quite easily, just my problem is positioning it. I want to create it dead center horiztonally (not so bothered about vertically). I've tried using "screen.width", and then doing few sums to create a from left number, but it's not going well. Does anybody already have a script, or know the best way of doing it?-Thanks
  20. MrAdam

    Random Text

    this little script allows you to assign a phrase or piece of text (max. 11) and then returns it from the function. function selectRandomText() {var txt = new Array(); txt[0] = "phrase 0"; txt[1] = "phrase 1"; txt[2] = "phrase 2"; txt[3] = "phrase 3"; txt[4] = "phrase 4"; txt[5] = "phrase 5"; txt[6] = "phrase 6"; txt[7] = "phrase 7"; txt[8] = "phrase 8"; txt[9] = "phrase 9"; txt[10] = "phrase 10";// max of 10 phrasesvar num = Math.floor(Math.random()*11);// randomlly selects a phrase in the array between 0 and 10.var selected = txt[num];return selected;}
  21. hmm.. problem is, i've made it so when you click the nav image, it appears directly below it, so where would i put the "onmouseout"; cos if i put it on the image it will be hidden as soon as someone tries to mouse over the menu... and im not sure how to do it in the create element part of the javascript.- thanks for the help btw
  22. hi. im struggling to create an if statement using "!" to make it the oppsite sort of thing.here's what i have at the moment: if (curX >= left && curX <= fmRight) { // nothing to happen here } else { element = document.getElementById('menu'); element.parentNode.removeChild(element); } that works fine! .. but.. i don't want to have an else init. i've tried adding an "!" here: ... if !( ... ... but it just said error when i tried to run it?can anybody help?- thanks
  23. thanks chocolate, but i've managed to get that far now. i have this function: function rosterList() { if(!document.getElementById('list')) { var listBox = document.createElement('div'); listBox.id = 'list'; listBox.style.width = '100px'; listBox.style.backgroundColor = '#30363D'; listBox.style.borderTop = '1px solid #C2D2E0'; listBox.style.borderBottom = '1px solid #1C1F22'; listBox.style.borderLeft = '1px solid #1C1F22'; listBox.style.borderRight = '1px solid #1C1F22'; listBox.style.color = '#f1f1f1'; listBox.style.fontFamily = 'Ms Sans Serif, Arial'; listBox.style.fontSize = '12px'; listBox.style.position = 'absolute'; listBox.style.top = '135px'; listBox.style.left = document.getElementById('headTbl').offsetLeft+411+'px'; listBox.style.padding = '2px'; listBox.innerHTML = ' ... my menu ... '; document.body.appendChild(listBox); }} .. and to run it i have an image on the nav menu i created with an "onClick" to run the function.it works perfect to display the menu, but what i am now trying to do is create a function, so that when i click off the menu it dissapears.- any idea how i should do that?thanks
×
×
  • Create New...