473,388 Members | 1,399 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

jquery modal dialog not working

Hello:

I have tried to implement a jquery modal dialog within an existing form. In my implementation I have had to eliminate the table and modified for use in our form. I have placed a query on the jquery ui forum but no one has answered.

I am having many issues with the form probably because I am not implementing it correctly. I have read the Nemikor blog and other posts but they have not helped with these issues. First, it appears that by using absolute urls to the jquery ui javascript and style sheets is giving me a 403 forbidden error. Is there a CDN version of these that I can use that will help this form work? I have downloaded the scripts locally but the modal dialog does not work when I do this.

Second, modifying the javascript creates formatting issues. Here is the code I am using:
Expand|Select|Wrap|Line Numbers
  1. f ( bValid ) {
  2.                         $( "#users" ).append(
  3.                             "<br style=\"width:100%;\">" + address.val() + "<br>" + "<br>" +
  4.  
  5.                             "<br>" + city.val() + "</br>" + "<br>" +
  6.  
  7.                             "<br>" + state.val() + "</br>" + "<br>" +
  8.  
  9.                         "<br>" + postalcode.val() + "</br>" + "<br>" +
  10.  
  11.                         "<br>" + country.val() + "</br>" + "<br>" +
  12.  
  13.                          "<br>" + companyphone.val() + "</br>" + "<br>" +
  14.  
  15.                          "<br>" + companyfax.val() + "</br>" +
  16.                          "<br>"); 
  17.  
  18.                         $( this ).dialog( "close" );
  19. ...
  20.  
Here is the url to the form:

http://inetwebdesign.com/PartnerPortal/update-my-company-information8.html

Because of all these issues, I am thinking of using an old school version of a modal dialog that I found in this forum today:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <title>Data Passing</title>
  6.  
  7. <script type="text/javascript">
  8. function abc()
  9. {
  10. var wind1=null;
  11. var tmp=null;
  12. wind1 = window.open('', 'displayWindow', 'width=200,height=300,status=no,toolbar=no,menubar =no,scrollbars=1');
  13. wind1.document.write("<script> function alert1(f){");
  14. wind1.document.write("var frmdst=f.ta.value;");
  15. wind1.document.write("window.opener.tmp=frmdst;");
  16. wind1.document.write("window.opener.getValues();") ;
  17. wind1.document.write("window.close();");
  18. wind1.document.write("}<\/script>");
  19. wind1.document.write("<html><body><form action='#' name='myform' action='post'><TEXTAREA rows='4' cols='20' name='ta'></TEXTAREA><br><INPUT type='button' value='save' onclick='javascript:alert1(this.form);'><INPUT type='button' value='cancel' onclick='javascript:window.close();'></form></body></html>");
  20. }
  21. function getValues()
  22. {
  23. document.forms["source"].elements["srctext"].value = tmp;
  24. }
  25.  
  26. </script>
  27. </head>
  28. <body>
  29. <form action="#" name="source" method="get">
  30. <input type="text" onclick='abc();' name="srctext" value="" style="width:300px;height:200px;" />
  31. </form>
  32. <body>
  33. </html>
  34.  
  35.  
One of the issues I have found with this code is that carriage returns are not reflected when you type in the dialog box. Does anyone know of a way to solve this issue?

So I have several questions:

1. Is there a way to fix the 403 forbidden errors in the attached code?

2. Is there a way to fix the formatting problems in the javascript so it formats properly in the attached code?

3. Is there a way to have the carriage return/new line reflected correctly in the old school text box?

Thanks so much for your help.

Regards,
seeker
Attached Files
File Type: txt update-my-company-information8.html.txt (23.3 KB, 260 views)
Jan 27 '12 #1
2 3517
acoder
16,027 Expert Mod 8TB
1. Here's Google CDN for jQuery UI:
http://code.google.com/apis/librarie....html#jqueryUI

2. What kind of formatting errors?
Jan 28 '12 #2
Thanks for your response. So linking to the CDN does not help, and downloading the images and the code to the local server does not help either. The jquery ui modal images do not work, so I probably have to check the path of each of the images. I became aware of jquery forbidding linking to the jqueryui.com server, so that answered the 403 error problem, however it still does not solve the problem of the images failing to load even though you put them all on the server.

The formatting problem when the images are loading correctly is that the input from the dialog box pushes the data far down to the center portion of the text area, and the first line is indented by 50pixels.

Not a good solution. I am working on "plan B" scrapping the jquery modal for an "old school" solution.
Jan 28 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop:...
2
by: Gilles T. | last post by:
Hi, How I can refresh a modal dialog in asp.net? I open a modal dialog in first with a dropdownlist. To add a element in my dropdownlist (table), I open a second modal dialog to ask element and...
0
by: Nonoy of Philippines | last post by:
Hello, guys... I'm just starting to develop web applications and I have this problem regarding Session objects At some parts of my application, I open modal dialog window which also opens...
1
by: Gibs | last post by:
Hey I tried to set the Image Button attributes dynamically like this. When the user click on the image button, that image has to show in a modal dialog box. I was able to do that with out any...
3
by: Earl Teigrob | last post by:
Can a Modal Dialog Box do forms ASP.NET forms validation from within the Modal Box? I want to pop up a dialog box to the user and have it do its own post backs with validation checking and then...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
4
by: mpreston | last post by:
I'm following the example from the MSDN library on how to create modal dialog boxes in C#, but something isn't working properly. If I create a modal dialog box and show it using ShowDialog(), the...
2
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the...
1
by: mikeh3275 | last post by:
I'm new to developing in jQuery, so I'm probably doing this wrong. I'm loading a form into a modal dialog box and I'm trying to assign a click event to the button in the form, but I can't seem to...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.