Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mpsnlap

macrumors newbie
Original poster
Jun 15, 2011
4
0
I am writing a web app and I am having a few problems. I want to go from the listLevel to a new level called the profileLevel. On the listLevel there will be a text box and a button and when the button is clicked it will take what has been entered into the text box and find that profile and display it on the profile level. Here is what I have written so far:


PHP:
function detailButtonHandler(event)
{
    // Values you provide
    var textFieldValue = document.getElementById("searchField");	// replace with ID of text field

    // Text field code
    textFieldValue = textFieldValue.value;
    
 var list = document.getElementById("list").object;
 var browser = document.getElementById('browser').object;

  if (selectedObjects && (1 == selectedObjects.length)){
        // The Browser's goForward method is used to make the browser push down to a new level.
        // Going back to previous levels is handled automatically.
   browser.goForward(document.getElementById('profileLevel'), selectedObjects[0].valueForKey("textFieldValue"));
    
}

I know that the last line (the browser.goForward line) is wrong. This is using the original demo that comes when you open dashcode. The demo has a list and when you click somewhere on the edge to edge list it goes to a new level. I want to go to the profile level but searching in a list using the textFieldValue. How can I fix this code to do this?
Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.