Jump to content

chokk

Members
  • Content Count

    193
  • Joined

  • Last visited

Community Reputation

0 Neutral

About chokk

  • Rank
    Member

Previous Fields

  • Languages
    HTML, CSS, PHP, MySQL

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Denmark
  1. Hey guys,I've been setting up a webshop using open source software and I've gotten to the point where I need to add a payment gateway. There aren't any extensions or addons written that I want to use. I've been searching the web trying to understand how a payment gateway interacts with a webshop and how data is transferred between them. I haven't found any guides that help me understand how to actually do this.I consider my skills in PHP intermediate .Could you give me a nudge in the right direction?Thanks in advance :)Edit: I found a thorough walkthrough on a website.
  2. Here's where the error is: function onclick(event) {toggleElement(commentsFor53);} And here's the error text: commentsFor53 is not defined. Tested with Firebug for Firefox.
  3. This revised code was a ###### for me to write, but here is the cross browser solution. Let me know how it works out for you: <script type="text/javascript">window.onload = function(){ var aNumber = document.getElementsByTagName('a').length; for(i=0; i<aNumber; i++) { document.getElementsByTagName('a').item(i).onclick = function(e) { stopAction(e); deleteFunction(this); } }}function stopAction(e){ if(!e) { if(window.event) { e = window.event; } else { return; } } if(e.preventDefault) { e.preventDefault(); } if(window.event) { e.returnValue = false; }}function deleteFunction(element){ if(element.hasAttribute('rel')) { if(element.getAttribute('rel') === 'delete') { if(confirm('Are you sure you want to do this? This action CANNOT be undone!!!')) { window.location = element.href; } else { return false; } } }}</script> *Tested in IE, Opera, Chrome, Firefox and Safari.
  4. Oh I forgot about cross browser compatibility. It works in Google Chrome. I'll get around to make it cross browser
  5. Here is what you are looking for.. Just something that I wrote quickly.. (updated and tested - works!) <script type="text/javascript">window.onload = function(){ // Get number of anchor tags in the document.. var aNumber = document.getElementsByTagName('a').length; // Start a loop to run through all anchor tags.. for(i=0; i<aNumber; i++) { // Add an event listener to all anchor tags.. document.getElementsByTagName('a').item(i).addEventListener('click', function() { // Prevent default action.. stopAction(event); // When an anchor tag is clicked then call the deleteFunction.. deleteFunction(this); }); } }function stopAction(e){ // Prevent default action.. e.preventDefault();}function deleteFunction(element){ // If an anchor tag has a rel attribute.. if(element.hasAttribute('rel')) { // And if the rel attribute is exactly equal to 'delete'.. if(element.getAttribute('rel') === 'delete') { // If the confirm box returns true.. if(confirm('Are you sure you want to do this? This action CANNOT be undone!!!')) { // Go to the element's href.. window.location = element.href; } // If the confirm box returns false.. else { // Return false (nothing happens).. return false; } } }}</script>
  6. Hey all,I'm doing a website for my dads advertising agency. It is a project I've been working in my sparetime for about 4 months. The underlying code is, well, messy to put it lightly, however I will review it upon completion (it is a work in progress). The administration panel is soaked in jQuery to make the process of administrating the site's content as noob-friendly as possible. Text on the site will be replaced with textareas once you doubleclick it and you can edit it in its place.Here's the siteHere's the adminview (for obvious reasons I can't allow public access to that part )Any critique is more than welcome!
  7. Glad to help + I enjoy dragonball very much
  8. Update your code to this. This updated code will validate the included pages. It is very important!It will also display the standard content if the validation fails. <?php// This is the path to the root folder of your website..$root = $_SERVER['DOCUMENT_ROOT'] . "/";/*Should your files be located in a folder somewhere then you change the above to look like this:$root = $_SERVER['DOCUMENT_ROOT'] . "/pathtothefolderwithyourfiles/";*/// This is the stuff you want to appear as the standard content..$standard_content = "<h2>Temporary Website Successfully Coded</h2><h6>May/21/2011 @ 5:18 pm EST - Posted by: Yamcha</h6><p>Hello Everyone! I've finally managed to hand code the website to xhtml/css :], now its just a matter of adding the content.. Will keep you updated :]</p>";// This first conditional tests to see if a page has been set..if(isset($_GET['page'])){ // Then it saves the page to a variable called page.. $page = $_GET['page']; // This conditional checks if the file exists on your server (this is the bit that validates).. if(file_exists($root . $page . ".php")) { // If the file exists then it will be included.. include_once($page . ".php"); } else { // If it doesn't exist then the standard content will be displayed.. echo $standard_content; }}// If the first conditional fails then this will be executed..else{ // The standard content will be displayed.. echo $standard_content; }?>
  9. it's window.onload not window.onLoad
  10. Okay, follow these steps I wrote..1. Rebuilding the navigation menuYou have a navigation-menu that looks like this: <li><a href="about.php">About Us</a></li> <li><a href="#">Link Exchange</a></li> <li><a href="#">Adventure History</a></li> <li><a href="#">Character Ages<a/></li> <li><a href="#">Character Biographies<a/></li> <li><a href="#">The Dragonballs<a/></li> <li><a href="#">Episode Guide<a/></li> <li><a href="#">Evil Shenrons</a></li> <li><a href="#">Hyperbolic Time Chamber</a></li> <li><a href="#">Movie Synopsis</a></li> <li><a href="#">Full Episodes & Movies</a></li> <li><a href="#">Watch Streaming</a></li> <li><a href="#">Downloads</a></li> <li><a href="gallery">Image Gallery</a></li> Instead of linking directly to the about page in the <a> tags we're gonna attach a variable to the url of the index page like this: <li><a href="index.php?page=about">About Us</a></li> In this way we have created a variable called 'page' and given it a value of 'about'. Now all we have to do is write a function that will load content based on the value you pass in the url. The function is gonna look like this: <?php // If the page variable has been set.. if(isset($_GET['page'])) { // Make php include the file associated with the value of 'page' .. include_once($_GET['page'] . ".php"); } // The page variable hasn't been set.. else { // Here you should include the news content (this is what happens when no link has been clicked).. }?> Now when you click a link it will attach a variable to the url and load content based on what the value is.
  11. var radiovalue=$("#dividcontainer input:radio:checked").val();
  12. Hey all,Topic title says all. I'm really curious - is it a hobby or do you do it for a living?
  13. Hey all,I've been noticing this function on some websites. Why do people post the page generation time on their website? What use is it for the average visitor? And lastly - do you use it?
  14. chokk

    Embed error

    okay, well.. I have a site here..http://tinyurl.com/6fpwzzxClick "reklamefilm" in the flash tagcloud. It opens up a jquery lightbox with a jquery contentslider which contains embedded youtube clips. Any suggestions how I can get this to work without getting those errors?(enable javascript console)
×
×
  • Create New...