PHP script to copy to clip board, Reloading Drupal Block without reloading whole page.

ameenrashadv - November 10, 2009 - 08:35

Hello Friends,
I am a beginner in PHP, can anyone help me to solve any of the bellow problems?

1) Can I copy a string to the clipboard of the computer?

2) is there any Idea to reload a single block in DRUPAL using a button(by clicking on it) , without reloading the whole page?

3) Can i reload a form in a page without reloading the whole page?

I am trying to make a web page in which I want to produce random words by clicking on a button, at the same clicking i also want to copy the 'word' to the clipboard.

Anyone who know PHP please help me by giving a solution.

Thanks in advance

Regards,
Ameen

PHP on the server does not

dman - November 10, 2009 - 08:50

PHP on the server does not have direct access to your client browser or your clipboard - for that you need to look at javascript, and it's different per-browser.

2 and 3) that's AJAX, You'll need to start learning some of that.
http://drupal.org/project/ajax_load
http://drupal.org/project/asynchronous
etc.

All have some assembly required.

.dan.

Javascript to copy to clipboard, for Firefox and Chrome....

ameenrashadv - November 10, 2009 - 18:33

Thanks for the reply dan,
I tried to use javascript, but the script was only working with Internet Explorer, I would like to make a script which works in Firefox and Chrome too....

Is it possible?

if yes, can anyone refer me any source to get the Script for the same?

Regards,
Ameen

_

WorldFallz - November 11, 2009 - 17:54

Please stop creating duplicate posts. Posting the same question over and over will not change the answer. I've deleted the dupe, thanks.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

hey

ameenrashadv - November 16, 2009 - 15:50

still, I didn't got answer for my question..... then what can i do?

_

WorldFallz - November 16, 2009 - 15:55

Try readying the link I posted above.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

 
 

Drupal is a registered trademark of Dries Buytaert.