I don't see any attempt at post, the form is using get. That's actually good because the ajaxpage function can't handle post, it can handle get.
BTW, the ajaxpage function appears to be stolen from this Dynamic Drive Script:
http://www.dynamicdrive.com/dynamici...jaxcontent.htm
You should restore the copyright notice.
OK, here's what I would try, on cagrilanilk.php change:
Code:
action="javascript:ajaxpage('cagrilanilk2.php','sagkolon');">
to:
Code:
action="javascript:ajaxpage('cagrilanilk2.php?fikrim=' + encodeURIComponent(document.getElementById('fikrim').value).replace(/(%20){1,}/g, '+'),'sagkolon');">
If that works out, great! Otherwise you'll need a different sort of AJAX script. In which case I'd suggest jQuery. But let's try this first and see what happens.
What I'd be most worried about is if there's a lot of text in the fikrim textarea, it might be too much for a get. In that case a post would be required.
Using jQuery and post -
index.php:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
#ustkolon {
width:979px;
height:36px;
margin-left:4px;
margin-bottom:10px;
border: 1px dashed #3ca3c1;
background:#AEE1E2;
}
#solkolon{
float:left;
margin-left:4px;
overflow:auto;
background:#91CED2;
width:250px;
height: 500px;
border: 1px dashed #3ca3c1;
padding: 3px;
}
a.tryitbtn,a.tryitbtn:link,a.tryitbtn:visited,a.showbtn,a.showbtn:link,a.showbtn:visited
{
display:block;
font: normal 12px arial;color:#096F78;
background:#ffffff;
width:225px;
border: 1px dashed #ffffff;
padding:3px;
margin-bottom:4px;
text-decoration:none;
}
a.tryitbtn:hover,a.tryitbtn:active,a.showbtn:hover,a.showbtn:active
{
color:#ffffff;
text-decoration :none;
background-color:#0E929E;
}
#sagkolon{
overflow:auto;
margin-left:10px;
float:left;
background:#CBC3C1;
height:500px;
width:714px;
margin-right: 5px;
padding-bottom: 8px;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
jQuery(function($){
var loading = '<img src="http://xyeze.com/yenixyezeeee/tools/images/loading.gif" alt="Loading . . ." title="Loading . . .">';
$('a.uibutton').click(function(e){
e.preventDefault();
$('#sagkolon').html(loading);
$.ajax({
url: 'cagrilanilk.php',
cache: false,
success: function(data){
$('#sagkolon').html(data);
}
});
});
$('#sagkolon form').live('submit', function(e){
e.preventDefault();
$.ajax({
url: 'cagrilanilk2.php',
cache: false,
beforeSend: function(){
$('#sagkolon').html(loading);
},
type: 'post',
data: $(this).serialize(),
success: function(data){
$('#sagkolon').html(data);
}
});
});
});
</script>
<div id="ustkolon">
<a href="#" class='uibutton confirm' title='yeni baslik açacagi' alt='yeni baslik açacagi' style='text-decoration:none;'>baslik aç</a>
</div>
<div id="solkolon"></div>
<div id="sagkolon">veri olmadimi burasi gelir veri çagrildimi bu kalkar sayfa gelir</div>
cagrilanilk.php:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="df" style="padding:10px;">
<form>
<textarea id='fikrim' style='border-color:#BEF2DF;width:573px;height:150px;' class='content' name='fikrim'></textarea>
<input type="submit" class="uibutton confirm" value="sal basligi ortama">
</form>
</div>
cagrilanilk2.php:
PHP Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
$fikrim=$_REQUEST['fikrim'];
echo "gelen veri ==>> $fikrim";
?>
Bookmarks