Is this box in my code editable? - php

I have this HTML code. This code will make a box leak on my website and it's function is to validate the message sent by the user. Anw you can run the code HERE to understand what I am talking about.
My question is how to edit the box and make it appear in the middle of the screen, above the current webpage? I mean like POPUP WINDOW. It will open with PHP echo and tell the user that his message has been sent successfully.
So how to make it popup in the middle of the screen when the user submits his message?
Any help will be highly appreciated. Thanks in advance.

Three things to do:
1. Your dropbox position is defined in js, modify here
var dropboxleft=screen.width/2
var dropboxtop=screen.height/2
2. Add negative margin to #dropinboxv2cover
margin-left:-250px;
margin-top:-150;
3. Change your current width of #dropinboxv2cover, it's too wide, change it to 500px.

Related

create a div that overlays on an html file?

I have a code (html) and I want it to be a div that overlays on another html file.
I want the div to appear when the user submits his message so it confirms that his message has been successfully sent.
as a conclusion, I want a html file to overlay on another one, so it appears as a form validation in php echo. So it has to be as a popup window validating the user's actions.
How to do it?
Thanks in advance. any help will be highly appreciated
First of all, this is not meant by PHP, it is meant by Javascript or Jquery. What you want here is called modal. To see some implementation for modal you may checkout Jqueryui from this link

Disappear text when button is clicked (JQUERY)

So I am making a small PHP Javascript and JQUERY Chatbox and so far its working pretty good but im trying to "Fancy it up". It asks you, the user, for your Name and once you type your name in to the input box you are supposed to click Enter which brings you to the chat box. Here is the code for the Chatbox.
http://pastebin.com/DgQEC9rV
You can find the Send button in the PHP at the top of the page.
But I was wondering how to make the Send button and the whole box it is in disappear with JQUERY and have the chat box still load in regularly.
A live example of the chat right now. --> http://www.carlosmayers.com/knil/chat/
I know just looking at the code might make this question seem very unapproachable but I know someone here can help me! Thanks.
If i intepreted your question right you just want to hide the hole chatbox. But it should still update itself.
So with jQuery you do this: $("#wrapper").attr("style", "display: none");
Whereas #wrapper is the div with the id (# := css-Selector) "wrapper" in your document.
jQuery now sets its style to "display: none", but the Chatbox will still be updated!
If you have Chrome, feel free to test it in the console first.
You could also use $("#wrapper").hide();

Auto grab link from popup and add into input

I was wondering if anyone could help me.
I have made an fiddle so you guys can easly understand me.
I have an button and input form.
I would like somehow to grab that link from popup once page finish loading. I've added google just for an example but it is an php file in real example.
So once page finish loading, an script would grab that link and paste it into input form.
I do not know if it is possible as nothing come up on my mind. Neither php, neither jQuery.
Anyone who knows if it's possible could give me some tips or example?
If the popup window is on the same domain as the page that triggered it, you can use:
var popup = window.open(); // popup code
alert(popup.location.href);
On the other hand, if the popup is on a different domain, then you will not be able to access its properties due to cross-site scripting restrictions.
http://en.wikipedia.org/wiki/Same_origin_policy

i want to show a panel just like facebook or for captcha validation

i have a simple form and when user enters all the information and hits the submit botton than a panel should open just a width of 200px and height of 100px inside the same window. which should have two fields one is captcha image and a text box and a check botton and if captcha code is right than panel should automatically close and redirect to another page just like facebook .
all the details of the panel is saved on another php file.
Check out recaptcha , read the documentation and understand how it works (takes only minutes)
How you implement that will be up to you eventually, but basically to do it the way you desire, you'll need to have some knowledge of javascript(jQuery or prototype will make the visual effects easier though).
To be more detailed, the captcha would already have been generated on the form, but the parent container should be hidden with a:
$('#captcha-container-id').slideUp();
As soon as the form is filled, you could then do a:
$('#captcha-container-id').slideDown();
The rest is pure PHP
NOTE: The javascript example is in jQuery
Hope this helps!
Use recapcha for getting the captions.
You will need to learn javascript to handle the window opening and closing effects
I hope you can handle the rest.

Form on PHP page with multiple submits changes CSS of page

I've created a PHP web form which when all the data is present has 2 submit buttons (Continue and Print). Continue calculates details based on the entered information and displays it on the page. Print performs the same calculations, but then creates a PDF in a new window.
When I click Print the original page still loads (which is fine) but the styling is altered.
To see what I mean head to this page and for speed enter "1" in all text boxes except Position (which must be text). After you've clicked Continue, click Print to generate a PDF, then look back at the original web page to see altered styling.
Any ideas would be useful.
Thanks,
Adrian
Assuming you mean the tables overrunning the footer, get rid of the height: 100%; on #prodselector_text, solves the issue for me.

Categories