Jump to content

DarkxPunk

Members
  • Posts

    465
  • Joined

  • Last visited

Everything posted by DarkxPunk

  1. Ha ha it's working! I am going to expand on this to include more information saved and will post the updated code here.Thanks again.
  2. Here is my test code: var currentPage = location.href; if (currentPage != 'beta.ormt.ca' && localStorage.getItem('lastPage') != null){localStorage.setItem('lastPage',currentPage);}if (currentPage = 'beta.ormt.ca' && localStorage.getItem('lastPage') != null){location.href = localStorage.getItem('lastPage');} Now this happens on load. What I don't understand is when I load the page it just started refreshing like mad. I don't understand why... Any ideas? (I just had one but too late to test... Is the lastPage key not keeping the resulting string, but rather the variable currentPage? If so how would I get around that?)Thanks for any help!
  3. One thing I would recommend is having the CSS file placed in the document using PHP. Just a idea.
  4. It is not stacking it's following exactly what you are telling it. If you put padding 30 on a div and repeat it you will have this|30(div)30|30(div)30| exactly as you specified. I would create a class specifically for the divs that will be side by side and one for divs beside other elements.
  5. I use ad blockers so I never noticed this but damn... Yeah switch your ad service guys!
  6. Hey everyone, So I have been researching this extensively and I cannot find an answer. Now can you peoples? Simply what happens is every time you open a web app on iOS it loads the page your created it from, now thats really annoying when you have a multipage web app and you do not want your users to lose their place (or information, but we will get at that after we solve the first problem). I have some places for myself and everyone else assisting to start and that is the fact that iOS uses HTML5 and Web Storage, great! That means we can save stuff for the users visiting the site (for example the last page they were on?). Now you may tell me, "Hey you found the solution" well I have no idea how to call it. I will try and understand but any help is appreciated. Thanks!
  7. Try: http://stackoverflow.com/questions/1489624/modifying-document-location-hash-without-page-scrolling
  8. I understand now. That explanation is really really going to help me in future projects. Your explanation should be put in the tutorial of js cause they don't outline that well there.
  9. You should learn all you can, and Ingolme is right.
  10. I could see it being useful if you want to add inline stuff to content based upon a class, rather than typing it in every time.For example.Image (auto generated content from say js) or,And repeat.Honestly I doubt anyone would really use it but you never know.
  11. You would need the link to call the jquery which may be a problem if other people link to the tab.I would have document.onload check the URL and if #tab4 is present load jquery.
  12. The problem i have is the fact that its not organized. If your doing web development for mobile web apps you do use all the languages but they intertwine allot and you got meta stuff per platform and allot of other little things dependent on mobile development. like if we open a mobile section i gladly work on hints, tips, and frameworks for that section. languages are not enough.
  13. Is it possible to search the href for something like .php then apply the on click otherwise don't apply the on click?I tried href.search(".php") but it does not work...Here is some other code I am trying, it does not exclude anchors not linking to ormt.ca though... Why? var domain = "ormt.ca";for (i = 0; i < a.length; i++){ var link = a[i].href if (link.indexOf(domain)) { a[i].onclick = function() {changePage(this);} }} Okay so I solved it... But I don't understand how, can anyone explain how that != -1 works? When I read it I see if blah is not equal to -1 than do blah, but instead it's if blah is not equal to -1 do blah? Or am I crazy? var domain = "ormt.ca";for (i = 0; i < a.length; i++){ var link = a[i].href if (link.indexOf(domain) != -1) { a[i].onclick = function() {changePage(this);} }}
  14. Simple idea/request add a Mobile Development section to the forum allowing us iOS and Android developers to share hints and tips to build a great web app.THANKS!
  15. Okay idk what I did differently, I repeated like last time and copy and pasted the code and now it's working -_-Thanks again!
  16. Indeed but why? What's wrong with his code?
  17. I'm using what you gave me, I either have the page reload constantly or I make slight changes and have the page load undefined. Never changes the anchors.
  18. It keeps looping and I can't figure out why... Page just reloads like mad.
  19. I used dsonesuk method. I think I misunderstood the article. No problem anyway dsonesuk method works so.
  20. interesting, but it's not replacing the defaultvalue when I change the content... Is it browser specific?
  21. Thank you very much! It's funny last night I was on a roll but never found the getElementByTagName method. Thanks a bunch!
  22. Because the parent is smaller than the child in the first example than in the second.Example one:Parent = 101px highChild = 102px high (100px + margin top 1px + margin bottom 1px)Example two:Parent = 102px highChild = 102px high (100px + margin top 1px + margin bottom 1px)That's why. If you want scroll bar just set overflow to scroll.
  23. I would report this in JS not here. That requires a fair bit of JS.
  24. Okay so I made it dynamic, now how can I make a function that when the page loads all anchors get onclick="changePage(this)" added to them. This is because users will add content on their own so when they put a link it needs to change over to the onclick.Ideas?Here is the code function changePage(link){ var aHref = link.href; link.href = null; location.href = aHref;} I also need something to tell it to not do it on certain links. Thanks!
×
×
  • Create New...