What I want to do is probably very simple, but I'm vortex/HTML neophyte...
I have a form with a SUBMIT button. I also have a function that performs a search, formats the search results into a string, and places the string into a variable named $rString. Here's what I want: When the user clicks the button, I want the value of $rString displayed in a text box in a new browser window. The new window also has a Close button. That's it.
Sorry. That doesn't seem to work, but I'm sure it's because I don't clearly understand what to do. The following does not cause the results to open in a new browser. CreateMarkedUpFilter is the name of the function that creates the string $rString. The button is in a form which is created by a another function called "Preview Filter". I cut out a lot of stuff, but basically here's what I have in my vortex file:
and this is assuming that "$url" is something that will print "displayFilter".
If it's not (and already does some other logic), it might be easist to do this with a javascript alert(), or maybe a confirm() window to verify that.
If this still isn't making sense, we should take a step back and review what behavior is actually desired, as I'm still not 100% clear on that (specifically in regards to $url).
OK. I understand. Now I see my mistake, and yes, that works. But here's a wrinkle... The button which is to bring up a new browser window is not the *only* button on the form. Clicking the others should NOT result in a new browser. Only the "Show Filter" button should bring up a new window. Is that do-able?
Jason, I posted my last response before I read your most recent. Sorry.
Ideally, all I really want is a simple popup window that shows a text string. That's it. Period. My last post referred to the fact that the button that the user clicks to show the popup is one of several buttons on the form. If I change the <form> tag, it seems that all the buttons on the form result in a new window, which I don't want.
You could use <button onclick="..."> to do a javascript alert or open a new window. You may have to put it in a separate form, not sure. This is an HTML authoring issue. You might find more help at any of dozens of HTML help sites.
The popup window contains the text you want correct?
So the only problem left is that the othe buttons also popup when you don't want them to?
If that's the case, then you'll need some javascript to change the "target" attribute of the <form> when that button is pressed.
You can use the onClick() event handler to execute some code that sets the target to "_blank", and all the other buttons can have an onClick that sets the target to "_self".