Link to home
Start Free TrialLog in
Avatar of Coast Line
Coast LineFlag for Canada

asked on

Classic javascript ShowModalDialog

Hi, i am working on an old application where classic javascript:ShowModalDialog.

Now my Scenario is like this!

1. I am calling a Coldfusion Custom tag in this Javascript Modal Window.
2. Other thing is there is a search interface build in the modal window.

My issue is when i click the clear, neither it clears the form values and neither it hides it the results shown.

i have a condition in the form where a hidden form field is created whose value is initially set to false.

and now on the click of the button, not a reset button but a simple button, i want it should call a block of cf code like <cfif form.btnname is true>
clear my sessions
</cfif>

but i am unable to do this.

it keeps getting errors

"no such interface is supported"

please guide
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

You cannot call a server process like that. What is on the client is already rendered. To call server processes you need to call the server using a link' a form submit or ajax.
Your question is also very unclear as to what happens when. Please elaborate and show some code too
Avatar of Coast Line

ASKER

ok if that is to happen through ajax, then how it can be done
You could have a search for cf ajax. I personallly use jQuery and do not have cf experience
yeah, u can guide me through the jquery, leave cf as such
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript"></script>
$(document).ready(function() {
  $("#logout").click(function() {
    $.get("logout.cf");
  });
});
</script>

<input id="logout" type="button" value="logout" />
very simple for you

Here i scene!@

I have a form, which shows results on the page, now on the Click of clear button!, the following should happen

1. Either the whole page should be reloaded and in that reload process, the sessions will get cleared

or

2. it should hide the earch results, it should clear my form fields, i mean reset the form

leave CF, how we do this step in showModalDialog Javascript Classic

If you have a modal pop up you will need an iframe to reload the page

Hiding search results could be as simple as
<input type="reset" onciick="document.getElementById("resultlistID").style.display='none'">
so u can say it cannot be reloaded
ASKER CERTIFIED SOLUTION
Avatar of Coast Line
Coast Line
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Accepted my Own becoz i was missing the [name] property in the submit button, but done it

Cheers:)
Hmm - did you use any of the script I gave you?
yes, i did but that were totally different way as i had to make a ajax call to do the work which was not helping me, else i could have chosen ur answer