Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
  • Location
    Ontario, Canada
  • Interests
    Stuff and Things.

adam84's Achievements

Advanced Member

Advanced Member (4/5)



  1. Awesome, Thank you very much. It seems to be working as expected
  2. Hello, I am having an issue and I not quite sure why it is happening or how to get it to work. What I am trying to do is resize the dialog to fit the screen when the mobile device is in portrait or landscape view. So I wrote the code to create the dialog, that works fine. It appears, disappears and is sized correctly upon creation var myDialog = $("div.myDia1").dialog({ autoOpen: false, resizable: false, modal: true, show: 'drop', hide: 'drop', width: $(window).width()-25, height: $(window).height()-25, open: function(){ $("div.myDia1").css("z-index", 105); } }); This is where the problem is happening. I have my function below that gets called once the device gets rotated. When I test the application with the following code, nothing seems to happen. The dialog stays the same size. $(window).on("orientationchange",function(){ $('div.myDia1').dialog( "option", "width", $(window).width()-25 ); $('div.myDia1').dialog( "option", "height", $(window).height()-25 ); }); I assumed that the function wasn't being called at all, so I put an alert into the function and once I did that, the function seemed to be working properly. The page loads, I open the dialog and rotate my phone from Portrait to Landscape, the alert appears, then the dialog gets resized to fit the screen. I them rotated the phone back from Landscape to Portrait, the alert appears, and the dialog get resize to fit the screen $(window).on("orientationchange",function(){ alert('Here I am'); $('div.myDia1').dialog( "option", "width", $(window).width()-25); $('div.myDia1').dialog( "option", "height", $(window).height()-25 ); }); So..... I am wondering why the function only works with the alert and what I can do to get it to work without the alert being there. Thanks in advance
  3. Hello, I need some help with a problem I am having. I have a site where a user can post a document and others can purchase it. My problem is how do I allow access to the document only once it is purchased? My current direction: When a user uploads a file to the site, the document goes into the main repository. When a user creates an account, a folder is also created on the server and named the user id for distinction. When a user purchases a document, the document is logged into the database (where I keep track of all the purchased documents) and a copy of the document is moved into the user’s folder from the main repository. Once the document is read or the time expires (i.e. 30 minutes from purchase), the document is removed from the user's folder and they cannot access the document again. Thoughts - I will have multiple copies of the same document saved on the server. (n)+1 documents. That might get out of hand. - If I get 1 million users, that means I will have 1 million user folders on the server - Im not concerned with the user downloading the document, the main issue is denying them access until purchased. What about storing the documents into the database? Is it better to load the content to a table or the save the actual document on the server? Thanks,
  4. Hi, I wrote a regex that will look for alphanumeric values only. /^\w+$/ What is happening is I am reading some data from a file and sometimes there is data that is invalid and it shows up as a square box. I am trying to develop a regex statement that will look for a character that is not [a-zA-Z0-9]. Any ideas on what I can do to make this work? Thanks
  5. Hello, I made a web application(PHP) that works with another application that was made(VB). In the web application, the user can enter a bunch of text and behind the scenes, I want to add some extra text to the end of the user entered text. My problem is when I add my extra text, i want a couple new lines that space out the two paragraphs of text, but if I enter the new line as <br /> or \n or \r or chr(13) or chr(10), nothing happens when I open it up in the VB program. There are not any new lines and somethings the actual characters '\n' show up. Does anyone know of a special character that I can enter to create the new line so that it shows up correctly in VB?
  6. I am using JQuery to capture a signature. It works well on my local computer. When I browse to the page on my cell phone, when I go to sign my name, my finger on the screen causes the screen to jump around and I cannot fully sign my name. I was just wondering if someone has encountered this before or knows a solution to this problem
  7. Hi, I just to know if there is a standard screen resolution that I should use when programming my site? Im programming in 1440x900, but sometimes I use an older computer that is 800x600. The results look different, is programming in 1400x900 a good idea, or should i use a screen resolution that s somewhat in the middle of the spectrum? Thanks
  8. I am trying to only allow letters, hyphens, periods and spacings Any suggestions would be helpful. function checkName( $name ){ if(!eregi("[a-zA-Z.' ]+", $name)) return false; return true; } Thank you
  9. There is some javascript code that I over looked that caused it to overwrite the css of something, any ways I commented out a line and everything is all good and handy, thanks
  10. Solved, In the sortable:receive function, I need to use $(ui.item).attr('id') to get the current ID of the item being 'sorted'. Then I didnt need to use the droppable function which for some reason wasn't always getting called. Nonetheless, it works and all is well, thanks
  11. It still gives me an error. But after some testing, I think I know what the promlem is, but I am not sure what to do to fix it. I am using droppable, and when I drop an item, i use the 'drop' function. In that function I get the ID of the div I dropped and store it in a variable. I am also using sortable, I use the 'receive' function, in this function I parse the stored ID, because it is made up of two other ID. My error happens during the parsing of the stored ID. What I think is happening is that the droppable function is not getting called, so it is not stored that ID I need. The only fix I can think of is to get the item ID in the sortable function, but I couldn't find a solution to get the value I needed. Any ideas?
  12. Hmmm, I am using JQuery. my code is like this <html> <head> all my js and css imports here </head> <body> html code </body> </html>
  13. I thought it might have been the cache, so I added something into the header section. Since I added that, the same issue has been happening, so I don't believe that was the problem. I believe everything is loaded because, I can drag items around my page just like normal, but the problem is when I drop the item, I try to get the ID of the dropped item, but when I alert the ID, nothing shows up, but if I refresh the page multiple times, it finally goes.
  14. Hey, I am using JQuery, draggable and sortable on my site. The user does whatever they do and if they made a change I use ajax to update my database with the changes. I also do a page refresh every 60secs, and once the page refresh my JQuery functions stop working. When I drop an item, I want to id to be alerted. Before the refresh the page works fine, but after the refresh nothing gets alerted. To get the page working again, I need to refresh the page mulitple times manually. Anyone ever have this issue before? $( ".weekday" ).droppable({ drop: function( event, ui ){ alert($(ui.draggable).attr("id")); } });
  15. The #blank div, turns the background dark, the #popUpDiv is the div that appears. I call a javascript function that makes changes the bg dark and makes the popup appear
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.