Jump to content

adam84

Members
  • Posts

    289
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Ontario, Canada
  • Interests
    Stuff and Things.
    Drugs
    Boobies

adam84's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  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,
×
×
  • 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.