Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mark L Bentley

Members
  • Joined

  • Last visited

Everything posted by Mark L Bentley

  1. This is how I have understood it in PHP Model = classes Controller = custom logic View = what is displayed So using your example USER Model Class User{ function all_users(){ //get all the users in the database } function single_user($id){ //get a single user } } USERS View <ul> <?php echo $user_list; ?> </ul> USER view <p> <?php echo $user; ?> </p> USER Controller $user_obj = new User(); if(!isset($id)){ $user_list = $user_obj -> all_users(); include('users.php'); }else{ $user = $user_obj -> single_user($id); include('user.php'); } I hope this helps/makes sense
  2. Have a look at RESTful APIs. I created a basic one for use with an iPhone app. Not sure how it's done in objective-c but you do POST/GET requests depending on what you want to do.
  3. Sorry to go off topic but do you know if those shin guards are available in the uK.
  4. Hello all. I'm no good at reg ex and just need a quick example. In javascript/jquery i'm looking to find everything in a string before the first <br /> tag and wrap it in <h1> tag. Any help appreciated thanks.
  5. I hope I can explain this clearly. I have a string from a php file: <?php Header("Cache-Control: no-store, no-cache, must-revalidate"); Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); Header("Pragma: no-cache"); header("Content-Type: text/xml;charset=iso-8859-1"); echo " <?xml version="1.0"?> <region> <id>1</id> <name>Channel Islands</name> <URL>0</URL> <popup>Currently no information for this area <BR>Check back soon.</popup> <color1>333333</color1> <color2>666666</color2> </region> <region> <id>2</id> <name>East Midlands</name> <URL>0</URL> <popup>3 Motorcycle Friendly places to stay in this region.</popup> <color1>6633FF</color1> <color2>6666FF</color2> </region> <region> <id>3</id> <name>Eastern England</name> <URL>0</URL> <popup>Currently no information for this area <BR>Check back soon.</popup> <color1>333333</color1> <color2>666666</color2> </region> "; ?> It's a lot longer than this but should be able to demonstrate with this. What I want to do is: In another file open this string, Find the popup for Eastern england edit save. I can open and save, its just locating that string which will not always be the same. Is there a way to find a string that starts with Eastern England and ends </popup>. I'm sure I should know this.
  6. have a look here If you need help implementing, give us a shout.
  7. not working in chrome or ie7 for me. THe path to jquery.js is wrong. http://www.demo.bdfbd.com/jquery.min.js does not exist
  8. Very basic example: store your page data in a database. e.g tag_id tag_name tag_description 1 HTML This is a page Then on your home page have a link <a href='dynamicpage.php?id=1'>HTML</a> You would then set up dynamicpage.php to get the id and then show the data associated with that id. I hope that makes a bit of sense.
  9. Put it all on a horse.
  10. In its most simple form you need A form to submit the text A php script to send the form to A database to store the text in A php script to output the text have a look here and here For an instant change on the page you could also use ajax If you don't need the text to be stored you could just use javascript and the text would return to it's original on refeshing the page.
  11. maybe something like this $(".link").mouseover(function() { $("#div").slideUp("fast"); }).mouseout(function(){ $("#div").slideUp("fast", function(){ $('#div').css(original position); }); }); This way it slides up on mouseover, then up again on mouseout. When the second slide up finishes it returns to its original place.
  12. You might like to try the .focus() event so that it works when people are tabbing through the form as well. $("input[class*=fnpanel]").focus(function(){ if ($("#fn-panel").is(":visible")) $("#fn-panel").stop().fadeTo(300, 0); else $("#fn-panel").stop().fadeTo(300, 1); });
  13. Well what do you know it worked nicely cheers.
  14. That makes sense, thanks. I assume in the php i could have echo $var1."|".$var2; which would work just as well
  15. I'll try to make it a bit clearer. I've got a form that I send to a php script using $('form').submit(function(){ $.post('form_submit.php', { formField1 : variable1, formField2: variable2 }, function(data){ $('#div').html(data); }); }); The script then passes back some info in the data variable. what i'd like to do is something like this $('form').submit(function(){ $.post('form_submit.php', { formField1 : variable1, formField2: variable2 }, function(data){ $('#div').html(data.var1); $('#div2').html(data.var2); }); }); I hope that makes more sense php would be $var1 = 'hello'; $var2 = 'goodbye';
  16. I'm using $.post to send some form data to a php script. I then want to display a message in one area and refresh another are of the page. I know how to get the data from the php script and display it. Can I get two variables from the php script and display them on two different parts of the page.
  17. stuck on a slice of pie. must have typed it wrong
  18. 42 isn't the meaning of life. It's the answer to the question.
  19. Maybe we could set up a a similar competition on here, like the website of the month one.
  20. I've managed to get this working on xp before. Get a usb stick, I would say at least 1gb. Download portable apps install on usb stick with open office included. You can get the minimum package and add open office. put your font here openoffice/share/fonts/truetype then in whatever program you are using import fonts form here. I've had it working with GIMP not tested on anything else. It might also work in the standard open office but not tested.
  21. I would have thought something like facebox would work with 1.4 have you tried it?
  22. Update your jquery.js file, download it from jquery site or link to it from google. Then see if the plugin still works. If it doesn't it might need some tweeking.
  23. Not tested but try <head> <script type="text/javascript"> var browser = navigator.appName; var browserName = getName(); var display = document.getElementById('browser'); function getName() { if ( browser == 'netscape') { display.innerHTML("You are using Firefox"); } else if ( browser == 'Microsoft Internet Explorer' ) { display.innerHTML("You are using Internet Explorer"); } else { display.innerHTML("You are using a web browser"); } } </script> </head> <body onLoad="getName();"> <p id="browser"> </p> </body>
  24. Unfortunately for you sir proper football starts again in a month. Ore season friendlies have already started. There is no escape, embrace it.
  25. Try pocket monkey (free) or FTP on the go (paid) for editing files on the go.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.