값넘기는것좀 도와주세요..ㅠ > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

값넘기는것좀 도와주세요..ㅠ 정보

값넘기는것좀 도와주세요..ㅠ

본문

위에서 보시는 바와같이 왼쪽 창에서 학교들중 하나를 선택하면 선택한 학교가 오른쪽  인풋박스에 나타납니다. 이후, 아래의 엑셀저장 버튼을 누르면 선택된 학교가 맨아래의 소스에서 school='학교이름과 같은 형태로 값으로 넘기고 싶습니다.
'schedule.excel.list.php에서는 넘겨받은 학교에 해당하는 내용만 엑셀로 출력되게 되어있습니다. 실력이 안되서 검색을 통해 필요한 기능만 모으다 보니, 최종적인 구현이 잘 안되고 있습니다. 소스를 가지고 직접 구현 시범보여주시면 정말 감사드리겠습니다.

<form name="form">
<select name="select" onchange="document.form.school.value=this.value;">
<?
  $select="select sch_name from g4_intranet_school where 1";
  $query=mysql_query($select);
while($data=mysql_fetch_assoc($query)){
echo "<option value='$data[sch_name]'>$data[sch_name]</option> ";

?>
</select>
<input type="text" name="school" value="">
</form>

<input type="button" name="button" value="엑셀저장" class="button" onclick="location.href='schedule.excel.list.php?url=<?=urlencode($url.($p['query']?"&":"?")."cf_page_rows=1000000000")?>&school=학교이름';">
  • 복사

댓글 전체

<form name="form">
<select name="select" onchange="document.form.school.value=this.value;">
<?
  $select="select sch_name from g4_intranet_school where 1";
  $query=mysql_query($select);
while($data=mysql_fetch_assoc($query)){
echo "<option value='$data[sch_name]'>$data[sch_name]</option> ";

?>
</select>
<input type="text" name="school" id="school" value="">
</form>

<input type="button" name="button" value="엑셀저장" class="button" onclick="page_move();">

<script type="text/javascript">
function page_move(){
school_name = document.getElementById("school").value;
location.href='schedule.excel.list.php?url=<?=urlencode($url.($p['query']?"&":"?")."cf_page_rows=1000000000")?>&school='+school_name;
}
</script>

이렇게 하면 안되려나용,, ㅎ
© SIRSOFT
현재 페이지 제일 처음으로