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

  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.    Mark L Bentley reacted to a post in a topic: Editing strings
  6. 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.
  7. have a look here If you need help implementing, give us a shout.
  8. 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
  9. 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.
  10. Put it all on a horse.
  11. 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.
  12. 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.
  13. 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); });
  14. Well what do you know it worked nicely cheers.
  15.    Mark L Bentley reacted to a post in a topic: $.post question
  16. That makes sense, thanks. I assume in the php i could have echo $var1."|".$var2; which would work just as well
  17. 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';

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.