1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Html web form not working inside js "accordion"

Discussion in 'Software Development' started by JiminSA, Dec 15, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    3,393
    First Name:
    Jim
    I'm trying to set up a website for mobile devices and have encountered a problem I, with my limited brain-power, cannot solve. So I thought that I would throw it out there and hopefully find someone who knows the solution!

    I am using a free template from an outfit in Australia - http://webmarketingforprofit.com.au/ - which uses a javascript expand and collapse routine, which works fine except where I have included a web form to get specific information from prospective clients.

    The problem is that the form automatically expands itself and will not contract - you'll get a better idea of what I mean if you view the page (in a normal browser) - here - http://surf4wheels.biz/Mobisite2/toggle2/

    Any ideas?:)
     
  2. ckphilli

    ckphilli

    Joined:
    Apr 29, 2006
    Messages:
    4,393
    If it were me, I would search the script to find the 'collapse' function. I assume the event is supposed to fire on click or load, whatever. You may be able to find the error through your browser tools. Should give you an idea to get started.

    Also, make sure your browser settings allow for such behavior.

    Good luck!:)
     
  3. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    3,393
    First Name:
    Jim
    Thank you for such a prompt and helpful reply - I have interrogated the Javascript and found nothing that is obviously contra to what is being done - but have a hunch that it does not like div's within the masterdiv. If this is the case how on earth can I produce a web form without Divs? (Flash, Php???)
    Incidentally if you want to view the offending page I've relocated it to http://surf4wheels.biz/m/index.htm - Many Thanks:)
     
  4. ckphilli

    ckphilli

    Joined:
    Apr 29, 2006
    Messages:
    4,393
    Are you talking about 'Evaluation Request' will not contract?
     
  5. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    3,393
    First Name:
    Jim
    That's correct...
     
  6. ckphilli

    ckphilli

    Joined:
    Apr 29, 2006
    Messages:
    4,393
    I'm not seeing anything hiding the 'form' div on page load as it's not a sibling from what I can tell (quick look mind you). I would play around with the doc ready function, first.

    But I would guess you can probably set the form div to display:none and then write an onclick function that unhides it. But I would try to get this into the doc.ready function, it's cleaner.

    Anyway, I'll check back later this evening.
     
  7. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    3,393
    First Name:
    Jim
    I was contemplating using a different expand-collapse routine which I know works fine with text divs and should happily handle forms, but yes it may be worthwhile pursuing this particular routine's javascript as it does render nicely on mobile devices.
    - check you later...
     
  8. ckphilli

    ckphilli

    Joined:
    Apr 29, 2006
    Messages:
    4,393
    How'd it go? Were you able to get the form hidden on load?
     
  9. JiminSA

    JiminSA Thread Starter

    Joined:
    Dec 15, 2011
    Messages:
    3,393
    First Name:
    Jim
    Sorry for the delay - i was side-tracked with a site to build...
    I have "solved" the problem by doing as i said i might - using a proven alternative expand/contract javscript routine...
    Thanks for all your guidance, it's much appreciated! My lack of JS knowledge didn't stop me doing as you suggested, but after faffing around for a couple of hours without a solution i fell back to plan B!:)
     
  10. ckphilli

    ckphilli

    Joined:
    Apr 29, 2006
    Messages:
    4,393
    Glad you got it working.
     
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1031326

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice