0

I coded a popup in ColdFusion 11 and want to popup content from a .cfm file in my localhost.

TryCF.com Gist

<cfajaximport tags="cfwindow"> 

<cfform name="test"> 
    <cfinput type="button" name="x" value="S"  
        onClick="ColdFusion.Window.create('Window1', 'Member Listing -- Webpage Dialog','http://localhost/My_stuff/hello1.cfm',{x:100,y:100,height:300,width:300,modal:false,closable:true,draggable:true,resizable:true,center:true,initshow:true, 
minheight:200,minwidth:200 })"> 
</cfform>

But it doesn't show any content inside the popup when I run the code. I read about popup from the ColdFusion.Window.create documenation.

Help me if I am missing something.

Leigh
  • 28,765
  • 10
  • 55
  • 103
VipinKundal
  • 442
  • 6
  • 14
  • What happens if you call http://localhost/My_stuff/hello1.cfm in a browser? – Sam M Jan 31 '16 at 23:50
  • 4
    Don't use `cfwindow`. All the ColdFusion UI components are outdated, severely limited and poorly implemented. Learn how to do this the right way with Bootstrap, jQuery, ExtJS, etc. – Scott Stroz Feb 02 '16 at 13:00
  • 1
    To answer your question, the example appears to be wrong. Try changing the url to just `/My_stuff/hello1.cfm`. Having said that, agreed about ditching the CF ajax components. Using a newer, more robust library will save headaches in the long run. Searching the archives will turn up plenty of examples, such as [jquery's dialog](http://stackoverflow.com/questions/3837166/jquery-load-modal-dialog-contents-via-ajax#3837203), etcetera.. – Leigh Feb 02 '16 at 16:14
  • I know about Bootstrap, jQuery etc.. but i got a project related to ColdFusion...@Scott Stroz – VipinKundal Feb 03 '16 at 14:42
  • @vipin. If nothing shows when you navigate a browser to hello1.cfm then your question isn't a problem with cfwindow. It's a problem with hello1.cfm. That's where you need to spend your time debugging. Why isn't hello1.cfm showing anything when you go to directly to that page in a browser. Maybe show us that cfm code and we can help. – Sam M Feb 03 '16 at 18:58
  • 1
    Why was this down voted? The question is clear and the asker explains both the actual and expected results. Sadly the fault seems to lie in documentation (again). FWIW, if you read the example the "hello1.cfm" page is literally hard coded text *"... The hello1.cfm file can be as simple as the following line:" `Hello from hello1.cfm`*. So the problem is NOT in hello1.cfm ;-) – Leigh Feb 03 '16 at 22:52
  • @SamM, fixed my issue related to http://localhost/My_stuff/hello1.cfm. Now it showing me on localhost. Thanks – VipinKundal Feb 04 '16 at 07:46
  • I think my localhost file is not getting to TryCF.com page. That's the problem. So i use with a link to open popup and show content using . I remove method () to get data content from localhost file. – VipinKundal Feb 04 '16 at 07:49
  • @Leigh, the downvote is from me apparently. I must have accidentally clicked it. I'm trying to undo the down vote but SO says my down vote is locked until the question is edited. – Sam M Feb 05 '16 at 01:48

0 Answers0