?
Solved

Classic javascript ShowModalDialog

Posted on 2011-10-22
13
Medium Priority
?
570 Views
Last Modified: 2012-05-12
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
0
Comment
  • 7
  • 6
13 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37013087
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
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 37013778
ok if that is to happen through ajax, then how it can be done
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37013880
You could have a search for cf ajax. I personallly use jQuery and do not have cf experience
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 37014989
yeah, u can guide me through the jquery, leave cf as such
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37015074
<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" />
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 37021089
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

0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37025914
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'">
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 37026242
so u can say it cannot be reloaded
0
 
LVL 16

Accepted Solution

by:
Gurpreet Singh Randhawa earned 0 total points
ID: 37092020
solved it, was missing the name from the input field and it worked
0
 
LVL 16

Author Closing Comment

by:Gurpreet Singh Randhawa
ID: 37230442
Accepted my Own becoz i was missing the [name] property in the submit button, but done it

Cheers:)
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37201051
Hmm - did you use any of the script I gave you?
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 37205783
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
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37206006
Hmm
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question