I need a little help with Dashcode

Discussion in 'Web Design and Development' started by thinhoo, Feb 2, 2011.

  1. thinhoo macrumors newbie

    Joined:
    Feb 2, 2011
    #1
    Dear MacRumors participants.

    I have a few questions.

    I'm currently trying to develop a webapp version of an in-House Medical Handbook. But my knowledge and skill in both JavaScript-, CSS- and HTML coding is limited. I've been reading in Apple' Developer Handbook (Safari Reference Book), but find this very confusing.

    So here it goes:

    1. I've been able to code a basic function: When clicked on a row in a tableview, an underlying StackLayout is loaded. Thats great. But I haven't been able to selectively define a different function for each row in that tableview. Right now all rows, when clicked, loads the same page, but change the name in the browser bar to the row defined name.. I've created the app from the ”browser” template.
    I have created a separate javaScript file, like in the browser template, defining the names in the table rows. The table is set to ”Dynamic” in Data Type (in Inspector under Attributes). But unlike the template version, the action ”onclick” has to load another StackLayout. I have attached two pictures of the coding in the file main.js. So, how do I define a different path for every row?

    2. The Handbook is quite big. I've thought it over severel times, and have decited to build it with severel StackLayouts and substacklayouts controlling every list view. But is that rational og logical? Would I be able to control all these and bind all these layouts in Dashcode together? Anyone have any good ideas?
    My idea was to start with a list of five rows of approach: Reference Book, ACLS, Contacts, News and the About page. Then when clicked it loads new substacklayouts..

    3. When I click the backbotton in the simulator, the rows i've just clicked on stil remain highlighted. Where do I chance that?

    I hope my presentation is not too messy! :)

    I'm looking forward to hear your answers.

    Best regards!
     

    Attached Files:

  2. thinhoo thread starter macrumors newbie

    Joined:
    Feb 2, 2011
    #2
    Problem solved! :)

    The problem is solved, thanks to "Dashcode for Dummies" :)

    But my next problem is, that I would like to implement a search function on my site. How do I do this?
    Any good tutorials for this problem?

    Best regards!
     
  3. mackman2011 macrumors newbie

    Joined:
    Apr 27, 2011
    #3
    javascript for the individual links

    thinhoo, thanks for the visuals but would you post the javascript that allowed you to view the different links from a list to list? I haven't had any luck with this yet. Thanks!
     

Share This Page