473,493 Members | 4,355 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

function from another page?

hi guys i was just wondering can i call a function from another page
and get the return value?
like if i had page1.php which have the function fun1() can i call this
function from another page ?? if i can how?? many thanx in advance :)...

Feb 21 '06 #1
2 2163
th*****@gmail.com wrote:
hi guys i was just wondering can i call a function from another page
and get the return value?
like if i had page1.php which have the function fun1() can i call this
function from another page ?? if i can how?? many thanx in advance :)...


Yes and no.

No, you cannot call a PHP function directly on another page.
You could however call another URI (could be PHP) and catch the complete
output of that script.
But why makes things so difficult?

Yes: If you modify your setup a little:
Why not put the function(s) in a seperate file, and include that file
whereever you need it?

Regards,
Erwin Moller
Feb 21 '06 #2
i already thought of putting the functions in a seprate file but i had
this idea of putting every page in a certain type like (news - links
...etc) and i wanted to make a super class that everyone can inherit and
this super class have a function that return the type .... i hope i
made it clear and thanx again man...

Feb 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4013
by: JoeK | last post by:
Hey all, I am automating a web page from Visual Foxpro. I can control all the textboxes, radio buttons, and command buttons using syntax such as: ...
2
9776
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
9
2852
by: Robby Bankston | last post by:
I'm working on some code and am running into brick walls. I'm trying to write out Javascript with Javascript and I've read the clj Meta FAQ and didn't see the answer, read many similar posts (with...
3
2290
by: Dennis Chang | last post by:
Hi all, I was reading about function pointers and came across something which intrigued me. K&R2 calls qsort (pg.119) within main as so: qsort( (void **) lineptr, 0, nlines-1, (int (*) (void...
0
1816
by: Michael L | last post by:
Hi Guys(I apologize for the lengty post - Im trying to explain it as best i can) I've been cracking my head on this one for the past 24+ hours and i have tried creating the function in ten...
28
4269
by: Larax | last post by:
Best explanation of my question will be an example, look below at this simple function: function SetEventHandler(element) { // some operations on element element.onclick = function(event) {
3
2213
by: RobG | last post by:
There has been a discussion on the iPhone web development group where an opinion has been expressed that function expressions are bad for performance and can be avoided by using function...
53
8314
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
2
3491
by: phpentrylevel | last post by:
hello i am a newbie to Javascript with a in depth background of PHP i have a simple script that replaces missing images when the webpage loads but i just cant get it to validate in JLint as my...
0
7157
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,...
1
6862
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...
0
5452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.